drivers/media/i2c/ov08d10.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/ov08d10.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/ov08d10.c- Extension
.c- Size
- 37019 bytes
- Lines
- 1627
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/i2c.hlinux/module.hlinux/pm_runtime.hlinux/regulator/consumer.hlinux/reset.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.h
Detected Declarations
struct ov08d10_regstruct ov08d10_reg_liststruct ov08d10_link_freq_configstruct ov08d10_modestruct ov08d10struct ov08d10_lane_cfgfunction ov08d10_get_format_codefunction ov08d10_modes_numfunction to_ratefunction to_pixels_per_linefunction ov08d10_write_reg_listfunction ov08d10_update_analog_gainfunction ov08d10_update_digital_gainfunction ov08d10_set_exposurefunction ov08d10_set_vblankfunction ov08d10_test_patternfunction ov08d10_set_ctrl_flipfunction ov08d10_set_ctrlfunction ov08d10_init_controlsfunction ov08d10_update_pad_formatfunction ov08d10_start_streamingfunction ov08d10_stop_streamingfunction ov08d10_set_streamfunction ov08d10_set_formatfunction ov08d10_get_formatfunction ov08d10_enum_mbus_codefunction ov08d10_enum_frame_sizefunction ov08d10_openfunction ov08d10_power_offfunction ov08d10_power_onfunction ov08d10_identify_modulefunction ov08d10_get_hwcfgfunction ov08d10_removefunction ov08d10_probe
Annotated Snippet
struct ov08d10_reg {
u8 address;
u8 val;
};
struct ov08d10_reg_list {
u32 num_of_regs;
const struct ov08d10_reg *regs;
};
static const u32 ov08d10_xvclk_freqs[] = {
19200000,
24000000
};
struct ov08d10_link_freq_config {
const struct ov08d10_reg_list reg_list[ARRAY_SIZE(ov08d10_xvclk_freqs)];
};
struct ov08d10_mode {
/* Frame width in pixels */
u32 width;
/* Frame height in pixels */
u32 height;
/* Horizontal timing size */
u32 hts;
/* Default vertical timing size */
u32 vts_def;
/* Min vertical timing size */
u32 vts_min;
/* Link frequency needed for this resolution */
u32 link_freq_index;
/* Sensor register settings for this resolution */
const struct ov08d10_reg_list reg_list;
/* Number of data lanes */
u8 data_lanes;
};
/* 3280x2460, 3264x2448 need 720Mbps/lane, 2 lanes - 19.2 MHz */
static const struct ov08d10_reg mipi_data_rate_720mbps_19_2[] = {
{0xfd, 0x00},
{0x11, 0x2a},
{0x14, 0x43},
{0x1a, 0x04},
{0x1b, 0xe1},
{0x1e, 0x13},
{0xb7, 0x02}
};
/* 1632x1224 needs 360Mbps/lane, 2 lanes - 19.2 MHz */
static const struct ov08d10_reg mipi_data_rate_360mbps_19_2[] = {
{0xfd, 0x00},
{0x1a, 0x04},
{0x1b, 0xe1},
{0x1d, 0x00},
{0x1c, 0x19},
{0x11, 0x2a},
{0x14, 0x54},
{0x1e, 0x13},
{0xb7, 0x02}
};
/* 3280x2460, 3264x2448 need 720Mbps/lane, 2 lanes - 24 MHz */
static const struct ov08d10_reg mipi_data_rate_720mbps_24_0[] = {
{0xfd, 0x00},
{0x11, 0x2a},
{0x14, 0x43},
{0x1a, 0x04},
{0x1b, 0xb4},
{0x1e, 0x13},
{0xb7, 0x02}
};
/* 1632x1224 needs 360Mbps/lane, 2 lanes - 24 MHz */
static const struct ov08d10_reg mipi_data_rate_360mbps_24_0[] = {
{0xfd, 0x00},
{0x1a, 0x04},
{0x1b, 0xb4},
{0x1d, 0x00},
{0x1c, 0x19},
{0x11, 0x2a},
{0x14, 0x54},
{0x1e, 0x13},
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/clk.h`, `linux/delay.h`, `linux/i2c.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/regulator/consumer.h`, `linux/reset.h`.
- Detected declarations: `struct ov08d10_reg`, `struct ov08d10_reg_list`, `struct ov08d10_link_freq_config`, `struct ov08d10_mode`, `struct ov08d10`, `struct ov08d10_lane_cfg`, `function ov08d10_get_format_code`, `function ov08d10_modes_num`, `function to_rate`, `function to_pixels_per_line`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.