drivers/media/i2c/gc08a3.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/gc08a3.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/gc08a3.c- Extension
.c- Size
- 33607 bytes
- Lines
- 1328
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/array_size.hlinux/bits.hlinux/clk.hlinux/container_of.hlinux/delay.hlinux/device.hlinux/err.hlinux/gpio/consumer.hlinux/math64.hlinux/mod_devicetable.hlinux/pm_runtime.hlinux/property.hlinux/regulator/consumer.hlinux/types.hlinux/units.hmedia/v4l2-cci.hmedia/v4l2-ctrls.hmedia/v4l2-fwnode.hmedia/v4l2-subdev.h
Detected Declarations
struct gc08a3struct gc08a3_reg_liststruct gc08a3_modefunction gc08a3_power_onfunction gc08a3_power_offfunction gc08a3_enum_mbus_codefunction gc08a3_enum_frame_sizefunction gc08a3_update_cur_mode_controlsfunction gc08a3_update_pad_formatfunction gc08a3_set_formatfunction gc08a3_get_selectionfunction gc08a3_init_statefunction gc08a3_set_ctrl_hflipfunction gc08a3_set_ctrl_vflipfunction gc08a3_test_patternfunction gc08a3_set_ctrlfunction gc08a3_start_streamingfunction gc08a3_stop_streamingfunction gc08a3_s_streamfunction gc08a3_get_regulatorsfunction gc08a3_parse_fwnodefunction gc08a3_to_pixel_ratefunction gc08a3_init_controlsfunction gc08a3_identify_modulefunction gc08a3_probefunction gc08a3_remove
Annotated Snippet
struct gc08a3 {
struct device *dev;
struct v4l2_subdev sd;
struct media_pad pad;
struct clk *xclk;
struct regulator_bulk_data supplies[ARRAY_SIZE(gc08a3_supply_name)];
struct gpio_desc *reset_gpio;
struct v4l2_ctrl_handler ctrls;
struct v4l2_ctrl *pixel_rate;
struct v4l2_ctrl *link_freq;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *hblank;
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
struct regmap *regmap;
unsigned long link_freq_bitmap;
const struct gc08a3_mode *cur_mode;
};
struct gc08a3_reg_list {
u32 num_of_regs;
const struct cci_reg_sequence *regs;
};
static const struct cci_reg_sequence mode_3264x2448[] = {
/* system */
{ CCI_REG8(0x0336), 0x70 },
{ CCI_REG8(0x0383), 0xbb },
{ CCI_REG8(0x0344), 0x00 },
{ CCI_REG8(0x0345), 0x06 },
{ CCI_REG8(0x0346), 0x00 },
{ CCI_REG8(0x0347), 0x04 },
{ CCI_REG8(0x0348), 0x0c },
{ CCI_REG8(0x0349), 0xd0 },
{ CCI_REG8(0x034a), 0x09 },
{ CCI_REG8(0x034b), 0x9c },
{ CCI_REG8(0x0202), 0x09 },
{ CCI_REG8(0x0203), 0x04 },
{ CCI_REG8(0x0340), 0x09 },
{ CCI_REG8(0x0341), 0xf4 },
{ CCI_REG8(0x0342), 0x07 },
{ CCI_REG8(0x0343), 0x1c },
{ CCI_REG8(0x0226), 0x00 },
{ CCI_REG8(0x0227), 0x28 },
{ CCI_REG8(0x0e38), 0x49 },
{ CCI_REG8(0x0210), 0x13 },
{ CCI_REG8(0x0218), 0x00 },
{ CCI_REG8(0x0241), 0x88 },
{ CCI_REG8(0x0392), 0x60 },
/* ISP */
{ CCI_REG8(0x00a2), 0x00 },
{ CCI_REG8(0x00a3), 0x00 },
{ CCI_REG8(0x00ab), 0x00 },
{ CCI_REG8(0x00ac), 0x00 },
/* GAIN */
{ CCI_REG8(0x0204), 0x04 },
{ CCI_REG8(0x0205), 0x00 },
{ CCI_REG8(0x0050), 0x5c },
{ CCI_REG8(0x0051), 0x44 },
/* out window */
{ CCI_REG8(0x009a), 0x66 },
{ CCI_REG8(0x0351), 0x00 },
{ CCI_REG8(0x0352), 0x06 },
{ CCI_REG8(0x0353), 0x00 },
{ CCI_REG8(0x0354), 0x08 },
{ CCI_REG8(0x034c), 0x0c },
{ CCI_REG8(0x034d), 0xc0 },
{ CCI_REG8(0x034e), 0x09 },
{ CCI_REG8(0x034f), 0x90 },
/* MIPI */
{ CCI_REG8(0x0114), 0x03 },
{ CCI_REG8(0x0180), 0x65 },
{ CCI_REG8(0x0181), 0xf0 },
{ CCI_REG8(0x0185), 0x01 },
{ CCI_REG8(0x0115), 0x30 },
{ CCI_REG8(0x011b), 0x12 },
{ CCI_REG8(0x011c), 0x12 },
{ CCI_REG8(0x0121), 0x06 },
{ CCI_REG8(0x0122), 0x06 },
{ CCI_REG8(0x0123), 0x15 },
{ CCI_REG8(0x0124), 0x01 },
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/bits.h`, `linux/clk.h`, `linux/container_of.h`, `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/gpio/consumer.h`.
- Detected declarations: `struct gc08a3`, `struct gc08a3_reg_list`, `struct gc08a3_mode`, `function gc08a3_power_on`, `function gc08a3_power_off`, `function gc08a3_enum_mbus_code`, `function gc08a3_enum_frame_size`, `function gc08a3_update_cur_mode_controls`, `function gc08a3_update_pad_format`, `function gc08a3_set_format`.
- 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.