drivers/media/i2c/ov13b10.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/ov13b10.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/ov13b10.c- Extension
.c- Size
- 38864 bytes
- Lines
- 1724
- 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/gpio/consumer.hlinux/i2c.hlinux/module.hlinux/pm_runtime.hlinux/regulator/consumer.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.h
Detected Declarations
struct ov13b10_regstruct ov13b10_reg_liststruct ov13b10_link_freq_configstruct ov13b10_modestruct ov13b10function link_freq_to_pixel_ratefunction ov13b10_read_regfunction ov13b10_write_regfunction ov13b10_write_regsfunction ov13b10_write_reg_listfunction ov13b10_openfunction ov13b10_update_digital_gainfunction ov13b10_enable_test_patternfunction ov13b10_set_ctrl_hflipfunction ov13b10_set_ctrl_vflipfunction ov13b10_set_ctrlfunction ov13b10_enum_mbus_codefunction ov13b10_enum_frame_sizefunction ov13b10_update_pad_formatfunction ov13b10_do_get_pad_formatfunction ov13b10_get_pad_formatfunction ov13b10_set_pad_formatfunction ov13b10_identify_modulefunction ov13b10_power_offfunction ov13b10_power_onfunction ov13b10_start_streamingfunction ov13b10_stop_streamingfunction ov13b10_set_streamfunction ov13b10_suspendfunction ov13b10_resumefunction ov13b10_init_controlsfunction ov13b10_free_controlsfunction ov13b10_get_pm_resourcesfunction ov13b10_check_hwcfgfunction ov13b10_probefunction ov13b10_remove
Annotated Snippet
struct ov13b10_reg {
u16 address;
u8 val;
};
struct ov13b10_reg_list {
u32 num_of_regs;
const struct ov13b10_reg *regs;
};
/* Link frequency config */
struct ov13b10_link_freq_config {
u64 link_freq;
/* registers for this link frequency */
struct ov13b10_reg_list reg_list;
};
/* Mode : resolution and related config&values */
struct ov13b10_mode {
/* Frame width */
u32 width;
/* Frame height */
u32 height;
/* V-timing */
u32 vts_def;
u32 vts_min;
/* Index of Link frequency config to be used */
u32 link_freq_index;
/* Pixels per line in current mode */
u32 ppl;
/* Default register values */
struct ov13b10_reg_list reg_list;
};
/* 4208x3120 needs 1120Mbps/lane, 4 lanes */
static const struct ov13b10_reg mipi_data_rate_1120mbps[] = {
{0x0103, 0x01},
{0x0303, 0x04},
{0x0305, 0xaf},
{0x0321, 0x00},
{0x0323, 0x04},
{0x0324, 0x01},
{0x0325, 0xa4},
{0x0326, 0x81},
{0x0327, 0x04},
{0x3012, 0x07},
{0x3013, 0x32},
{0x3107, 0x23},
{0x3501, 0x0c},
{0x3502, 0x10},
{0x3504, 0x08},
{0x3508, 0x07},
{0x3509, 0xc0},
{0x3600, 0x16},
{0x3601, 0x54},
{0x3612, 0x4e},
{0x3620, 0x00},
{0x3621, 0x68},
{0x3622, 0x66},
{0x3623, 0x03},
{0x3662, 0x92},
{0x3666, 0xbb},
{0x3667, 0x44},
{0x366e, 0xff},
{0x366f, 0xf3},
{0x3675, 0x44},
{0x3676, 0x00},
{0x367f, 0xe9},
{0x3681, 0x32},
{0x3682, 0x1f},
{0x3683, 0x0b},
{0x3684, 0x0b},
{0x3704, 0x0f},
{0x3706, 0x40},
{0x3708, 0x3b},
{0x3709, 0x72},
{0x370b, 0xa2},
{0x3714, 0x24},
{0x371a, 0x3e},
{0x3725, 0x42},
{0x3739, 0x12},
{0x3767, 0x00},
{0x377a, 0x0d},
{0x3789, 0x18},
{0x3790, 0x40},
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 ov13b10_reg`, `struct ov13b10_reg_list`, `struct ov13b10_link_freq_config`, `struct ov13b10_mode`, `struct ov13b10`, `function link_freq_to_pixel_rate`, `function ov13b10_read_reg`, `function ov13b10_write_reg`, `function ov13b10_write_regs`, `function ov13b10_write_reg_list`.
- 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.