drivers/media/i2c/gc05a2.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/gc05a2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/gc05a2.c- Extension
.c- Size
- 34385 bytes
- Lines
- 1348
- 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 gc05a2struct gc05a2_reg_liststruct gc05a2_modefunction gc05a2_power_onfunction gc05a2_power_offfunction gc05a2_enum_mbus_codefunction gc05a2_enum_frame_sizefunction gc05a2_update_cur_mode_controlsfunction gc05a2_update_pad_formatfunction gc05a2_set_formatfunction gc05a2_get_selectionfunction gc05a2_init_statefunction gc05a2_set_ctrl_hflipfunction gc05a2_set_ctrl_vflipfunction gc05a2_test_patternfunction gc05a2_set_ctrlfunction gc05a2_identify_modulefunction gc05a2_start_streamingfunction gc05a2_stop_streamingfunction gc05a2_s_streamfunction gc05a2_get_regulatorsfunction gc05a2_parse_fwnodefunction gc05a2_to_pixel_ratefunction gc05a2_init_controlsfunction gc05a2_probefunction gc05a2_remove
Annotated Snippet
struct gc05a2 {
struct device *dev;
struct v4l2_subdev sd;
struct media_pad pad;
struct clk *xclk;
struct regulator_bulk_data supplies[ARRAY_SIZE(gc05a2_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;
/* True if the device has been identified */
bool identified;
const struct gc05a2_mode *cur_mode;
};
struct gc05a2_reg_list {
u32 num_of_regs;
const struct cci_reg_sequence *regs;
};
static const struct cci_reg_sequence mode_2592x1944[] = {
/* system */
{ CCI_REG8(0x0135), 0x01 },
{ CCI_REG8(0x0084), 0x21 },
{ CCI_REG8(0x0d05), 0xcc },
{ CCI_REG8(0x0218), 0x00 },
{ CCI_REG8(0x005e), 0x48 },
{ CCI_REG8(0x0d06), 0x01 },
{ CCI_REG8(0x0007), 0x16 },
{ CCI_REG8(0x0101), 0x00 },
/* analog */
{ CCI_REG8(0x0342), 0x07 },
{ CCI_REG8(0x0343), 0x28 },
{ CCI_REG8(0x0220), 0x07 },
{ CCI_REG8(0x0221), 0xd0 },
{ CCI_REG8(0x0202), 0x07 },
{ CCI_REG8(0x0203), 0x32 },
{ CCI_REG8(0x0340), 0x07 },
{ CCI_REG8(0x0341), 0xf0 },
{ CCI_REG8(0x0219), 0x00 },
{ CCI_REG8(0x0346), 0x00 },
{ CCI_REG8(0x0347), 0x04 },
{ CCI_REG8(0x0d14), 0x00 },
{ CCI_REG8(0x0d13), 0x05 },
{ CCI_REG8(0x0d16), 0x05 },
{ CCI_REG8(0x0d15), 0x1d },
{ CCI_REG8(0x00c0), 0x0a },
{ CCI_REG8(0x00c1), 0x30 },
{ CCI_REG8(0x034a), 0x07 },
{ CCI_REG8(0x034b), 0xa8 },
{ CCI_REG8(0x0e0a), 0x00 },
{ CCI_REG8(0x0e0b), 0x00 },
{ CCI_REG8(0x0e0e), 0x03 },
{ CCI_REG8(0x0e0f), 0x00 },
{ CCI_REG8(0x0e06), 0x0a },
{ CCI_REG8(0x0e23), 0x15 },
{ CCI_REG8(0x0e24), 0x15 },
{ CCI_REG8(0x0e2a), 0x10 },
{ CCI_REG8(0x0e2b), 0x10 },
{ CCI_REG8(0x0e17), 0x49 },
{ CCI_REG8(0x0e1b), 0x1c },
{ CCI_REG8(0x0e3a), 0x36 },
{ CCI_REG8(0x0d11), 0x84 },
{ CCI_REG8(0x0e52), 0x14 },
{ CCI_REG8(0x000b), 0x10 },
{ CCI_REG8(0x0008), 0x08 },
{ CCI_REG8(0x0223), 0x17 },
{ CCI_REG8(0x0d27), 0x39 },
{ CCI_REG8(0x0d22), 0x00 },
{ CCI_REG8(0x03f6), 0x0d },
{ CCI_REG8(0x0d04), 0x07 },
{ CCI_REG8(0x03f3), 0x72 },
{ CCI_REG8(0x03f4), 0xb8 },
{ CCI_REG8(0x03f5), 0xbc },
{ CCI_REG8(0x0d02), 0x73 },
/* auto load start */
{ CCI_REG8(0x00cb), 0x00 },
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 gc05a2`, `struct gc05a2_reg_list`, `struct gc05a2_mode`, `function gc05a2_power_on`, `function gc05a2_power_off`, `function gc05a2_enum_mbus_code`, `function gc05a2_enum_frame_size`, `function gc05a2_update_cur_mode_controls`, `function gc05a2_update_pad_format`, `function gc05a2_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.