drivers/media/usb/gspca/etoms.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/etoms.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/gspca/etoms.c- Extension
.c- Size
- 22026 bytes
- Lines
- 783
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
gspca.h
Detected Declarations
struct sdfunction reg_rfunction reg_w_valfunction reg_wfunction i2c_wfunction i2c_rfunction Et_WaitStatusfunction et_videofunction Et_init2function setbrightnessfunction setcontrastfunction setcolorsfunction getcolorsfunction setautogainfunction Et_init1function sd_configfunction sd_initfunction sd_startfunction sd_stopNfunction Et_getgainGfunction Et_setgainGfunction do_autogainfunction sd_s_ctrlfunction sd_init_controlsfunction sd_probe
Annotated Snippet
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
unsigned char autogain;
char sensor;
#define SENSOR_PAS106 0
#define SENSOR_TAS5130CXX 1
signed char ag_cnt;
#define AG_CNT_START 13
};
static const struct v4l2_pix_format vga_mode[] = {
{320, 240, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 320,
.sizeimage = 320 * 240,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1},
/* {640, 480, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 640,
.sizeimage = 640 * 480,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0}, */
};
static const struct v4l2_pix_format sif_mode[] = {
{176, 144, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 176,
.sizeimage = 176 * 144,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 1},
{352, 288, V4L2_PIX_FMT_SBGGR8, V4L2_FIELD_NONE,
.bytesperline = 352,
.sizeimage = 352 * 288,
.colorspace = V4L2_COLORSPACE_SRGB,
.priv = 0},
};
#define ETOMS_ALT_SIZE_1000 12
#define ET_GPIO_DIR_CTRL 0x04 /* Control IO bit[0..5] (0 in 1 out) */
#define ET_GPIO_OUT 0x05 /* Only IO data */
#define ET_GPIO_IN 0x06 /* Read Only IO data */
#define ET_RESET_ALL 0x03
#define ET_ClCK 0x01
#define ET_CTRL 0x02 /* enable i2c OutClck Powerdown mode */
#define ET_COMP 0x12 /* Compression register */
#define ET_MAXQt 0x13
#define ET_MINQt 0x14
#define ET_COMP_VAL0 0x02
#define ET_COMP_VAL1 0x03
#define ET_REG1d 0x1d
#define ET_REG1e 0x1e
#define ET_REG1f 0x1f
#define ET_REG20 0x20
#define ET_REG21 0x21
#define ET_REG22 0x22
#define ET_REG23 0x23
#define ET_REG24 0x24
#define ET_REG25 0x25
/* base registers for luma calculation */
#define ET_LUMA_CENTER 0x39
#define ET_G_RED 0x4d
#define ET_G_GREEN1 0x4e
#define ET_G_BLUE 0x4f
#define ET_G_GREEN2 0x50
#define ET_G_GR_H 0x51
#define ET_G_GB_H 0x52
#define ET_O_RED 0x34
#define ET_O_GREEN1 0x35
#define ET_O_BLUE 0x36
#define ET_O_GREEN2 0x37
#define ET_SYNCHRO 0x68
#define ET_STARTX 0x69
#define ET_STARTY 0x6a
#define ET_WIDTH_LOW 0x6b
#define ET_HEIGTH_LOW 0x6c
#define ET_W_H_HEIGTH 0x6d
#define ET_REG6e 0x6e /* OBW */
#define ET_REG6f 0x6f /* OBW */
#define ET_REG70 0x70 /* OBW_AWB */
#define ET_REG71 0x71 /* OBW_AWB */
#define ET_REG72 0x72 /* OBW_AWB */
#define ET_REG73 0x73 /* Clkdelay ns */
Annotation
- Immediate include surface: `gspca.h`.
- Detected declarations: `struct sd`, `function reg_r`, `function reg_w_val`, `function reg_w`, `function i2c_w`, `function i2c_r`, `function Et_WaitStatus`, `function et_video`, `function Et_init2`, `function setbrightness`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.