drivers/media/i2c/og01a1b.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/og01a1b.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/og01a1b.c- Extension
.c- Size
- 30066 bytes
- Lines
- 1143
- 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/acpi.hlinux/clk.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/module.hlinux/pm_runtime.hlinux/regulator/consumer.hmedia/v4l2-cci.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.h
Detected Declarations
struct og01a1b_reg_liststruct og01a1b_link_freq_configstruct og01a1b_modestruct og01a1bfunction to_pixel_ratefunction to_pixels_per_linefunction og01a1b_test_patternfunction og01a1b_set_ctrlfunction og01a1b_init_controlsfunction og01a1b_update_pad_formatfunction og01a1b_enable_streamsfunction og01a1b_disable_streamsfunction og01a1b_set_formatfunction og01a1b_enum_mbus_codefunction og01a1b_enum_frame_sizefunction og01a1b_init_statefunction og01a1b_identify_modulefunction og01a1b_check_hwcfgfunction og01a1b_power_onfunction og01a1b_power_offfunction og01a1b_removefunction og01a1b_probe
Annotated Snippet
struct og01a1b_reg_list {
const struct cci_reg_sequence *regs;
u32 num_of_regs;
};
struct og01a1b_link_freq_config {
const struct og01a1b_reg_list reg_list;
};
struct og01a1b_mode {
/* Frame width in pixels */
u32 width;
/* Frame height in pixels */
u32 height;
/* Horizontal timining size */
u32 hts;
/* Default vertical timining size */
u32 vts_def;
/* Min vertical timining size */
u32 vts_min;
/* Link frequency needed for this resolution */
u32 link_freq_index;
/* Sensor register settings for this resolution */
const struct og01a1b_reg_list reg_list;
};
static const u32 og01a1b_mbus_formats[] = {
MEDIA_BUS_FMT_Y10_1X10,
MEDIA_BUS_FMT_Y8_1X8,
};
static const struct cci_reg_sequence mipi_data_rate_1000mbps[] = {
{ CCI_REG8(0x0103), 0x01 },
{ CCI_REG8(0x0303), 0x02 },
{ CCI_REG8(0x0304), 0x00 },
{ CCI_REG8(0x0305), 0xd2 },
{ CCI_REG8(0x0323), 0x02 },
{ CCI_REG8(0x0324), 0x01 },
{ CCI_REG8(0x0325), 0x77 },
};
static const struct cci_reg_sequence mode_1280x1024_regs[] = {
{ CCI_REG8(0x0300), 0x0a },
{ CCI_REG8(0x0301), 0x29 },
{ CCI_REG8(0x0302), 0x31 },
{ CCI_REG8(0x0303), 0x02 },
{ CCI_REG8(0x0304), 0x00 },
{ CCI_REG8(0x0305), 0xd2 },
{ CCI_REG8(0x0306), 0x00 },
{ CCI_REG8(0x0307), 0x01 },
{ CCI_REG8(0x0308), 0x02 },
{ CCI_REG8(0x0309), 0x00 },
{ CCI_REG8(0x0310), 0x00 },
{ CCI_REG8(0x0311), 0x00 },
{ CCI_REG8(0x0312), 0x07 },
{ CCI_REG8(0x0313), 0x00 },
{ CCI_REG8(0x0314), 0x00 },
{ CCI_REG8(0x0315), 0x00 },
{ CCI_REG8(0x0320), 0x02 },
{ CCI_REG8(0x0321), 0x01 },
{ CCI_REG8(0x0322), 0x01 },
{ CCI_REG8(0x0323), 0x02 },
{ CCI_REG8(0x0324), 0x01 },
{ CCI_REG8(0x0325), 0x77 },
{ CCI_REG8(0x0326), 0xce },
{ CCI_REG8(0x0327), 0x04 },
{ CCI_REG8(0x0329), 0x02 },
{ CCI_REG8(0x032a), 0x04 },
{ CCI_REG8(0x032b), 0x04 },
{ CCI_REG8(0x032c), 0x02 },
{ CCI_REG8(0x032d), 0x01 },
{ CCI_REG8(0x032e), 0x00 },
{ CCI_REG8(0x300d), 0x02 },
{ CCI_REG8(0x300e), 0x04 },
{ CCI_REG8(0x3021), 0x08 },
{ CCI_REG8(0x301e), 0x03 },
{ CCI_REG8(0x3103), 0x00 },
{ CCI_REG8(0x3106), 0x08 },
{ CCI_REG8(0x3107), 0x40 },
{ CCI_REG8(0x3216), 0x01 },
{ CCI_REG8(0x3217), 0x00 },
{ CCI_REG8(0x3218), 0xc0 },
{ CCI_REG8(0x3219), 0x55 },
{ CCI_REG8(0x3500), 0x00 },
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/clk.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct og01a1b_reg_list`, `struct og01a1b_link_freq_config`, `struct og01a1b_mode`, `struct og01a1b`, `function to_pixel_rate`, `function to_pixels_per_line`, `function og01a1b_test_pattern`, `function og01a1b_set_ctrl`, `function og01a1b_init_controls`, `function og01a1b_update_pad_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.