drivers/media/i2c/ov64a40.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/ov64a40.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/ov64a40.c- Extension
.c- Size
- 168418 bytes
- Lines
- 3678
- 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/clk.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/mod_devicetable.hlinux/module.hlinux/pm_runtime.hlinux/regulator/consumer.hmedia/v4l2-cci.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.hmedia/v4l2-mediabus.hmedia/v4l2-subdev.h
Detected Declarations
struct ov64a40_regliststruct ov64a40_subsamplingstruct ov64a40_timingsstruct ov64a40enum ov64a40_link_freq_idsfunction ov64a40_get_timingsfunction ov64a40_program_geometryfunction ov64a40_program_subsamplingfunction ov64a40_start_streamingfunction ov64a40_stop_streamingfunction ov64a40_set_streamfunction ov64a40_mbus_codefunction ov64a40_update_pad_fmtfunction ov64a40_init_statefunction ov64a40_enum_mbus_codefunction ov64a40_enum_frame_sizefunction ov64a40_get_selectionfunction ov64a40_set_formatfunction ov64a40_power_onfunction ov64a40_power_offfunction ov64a40_link_freq_configfunction ov64a40_set_ctrlfunction ov64a40_init_controlsfunction ov64a40_identifyfunction ov64a40_parse_dtfunction ov64a40_get_regulatorsfunction ov64a40_probefunction ov64a40_remove
Annotated Snippet
struct ov64a40_reglist {
unsigned int num_regs;
const struct cci_reg_sequence *regvals;
};
struct ov64a40_subsampling {
unsigned int x_odd_inc;
unsigned int x_even_inc;
unsigned int y_odd_inc;
unsigned int y_even_inc;
bool vbin;
bool hbin;
};
static struct ov64a40_mode {
unsigned int width;
unsigned int height;
struct ov64a40_timings {
unsigned int vts;
unsigned int ppl;
} timings_default[OV64A40_NUM_LINK_FREQ];
const struct ov64a40_reglist reglist;
struct v4l2_rect analogue_crop;
struct v4l2_rect digital_crop;
struct ov64a40_subsampling subsampling;
} ov64a40_modes[] = {
/* Full resolution */
{
.width = 9248,
.height = 6944,
.timings_default = {
/* 2.6 FPS */
[OV64A40_LINK_FREQ_456M_ID] = {
.vts = 7072,
.ppl = 4072,
},
/* 2 FPS */
[OV64A40_LINK_FREQ_360M_ID] = {
.vts = 7072,
.ppl = 5248,
},
},
.reglist = {
.num_regs = ARRAY_SIZE(ov64a40_9248x6944),
.regvals = ov64a40_9248x6944,
},
.analogue_crop = {
.left = 0,
.top = 0,
.width = 9280,
.height = 6976,
},
.digital_crop = {
.left = 17,
.top = 16,
.width = 9248,
.height = 6944,
},
.subsampling = {
.x_odd_inc = 1,
.x_even_inc = 1,
.y_odd_inc = 1,
.y_even_inc = 1,
.vbin = false,
.hbin = false,
},
},
/* Analogue crop + digital crop */
{
.width = 8000,
.height = 6000,
.timings_default = {
/* 3.0 FPS */
[OV64A40_LINK_FREQ_456M_ID] = {
.vts = 6400,
.ppl = 3848,
},
/* 2.5 FPS */
[OV64A40_LINK_FREQ_360M_ID] = {
.vts = 6304,
.ppl = 4736,
},
},
.reglist = {
.num_regs = ARRAY_SIZE(ov64a40_8000x6000),
.regvals = ov64a40_8000x6000,
},
.analogue_crop = {
.left = 624,
.top = 472,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct ov64a40_reglist`, `struct ov64a40_subsampling`, `struct ov64a40_timings`, `struct ov64a40`, `enum ov64a40_link_freq_ids`, `function ov64a40_get_timings`, `function ov64a40_program_geometry`, `function ov64a40_program_subsampling`, `function ov64a40_start_streaming`, `function ov64a40_stop_streaming`.
- 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.