drivers/media/i2c/ov6211.c
Source file repositories/reference/linux-study-clean/drivers/media/i2c/ov6211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/ov6211.c- Extension
.c- Size
- 21416 bytes
- Lines
- 819
- 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/module.hlinux/pm_runtime.hlinux/regulator/consumer.hlinux/units.hmedia/v4l2-cci.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.h
Detected Declarations
struct ov6211_reg_liststruct ov6211_modestruct ov6211function ov6211_set_test_patternfunction ov6211_set_ctrlfunction ov6211_init_controlsfunction ov6211_update_pad_formatfunction ov6211_enable_streamsfunction ov6211_disable_streamsfunction ov6211_set_pad_formatfunction ov6211_enum_mbus_codefunction ov6211_enum_frame_sizefunction ov6211_init_statefunction ov6211_identify_sensorfunction ov6211_check_hwcfgfunction ov6211_power_onfunction ov6211_power_offfunction ov6211_probefunction ov6211_remove
Annotated Snippet
struct ov6211_reg_list {
const struct cci_reg_sequence *regs;
unsigned int num_regs;
};
struct ov6211_mode {
u32 width; /* Frame width in pixels */
u32 height; /* Frame height in pixels */
u32 hts; /* Horizontal timing size */
u32 vts; /* Default vertical timing size */
u32 bpp; /* Bits per pixel */
const struct ov6211_reg_list reg_list; /* Sensor register setting */
};
static const char * const ov6211_test_pattern_menu[] = {
"Disabled",
"Vertical Colour Bars",
};
static const char * const ov6211_supply_names[] = {
"avdd", /* Analog power */
"dovdd", /* Digital I/O power */
"dvdd", /* Digital core power */
};
#define OV6211_NUM_SUPPLIES ARRAY_SIZE(ov6211_supply_names)
struct ov6211 {
struct device *dev;
struct regmap *regmap;
struct clk *xvclk;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data supplies[OV6211_NUM_SUPPLIES];
struct v4l2_subdev sd;
struct media_pad pad;
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *exposure;
struct v4l2_ctrl_handler ctrl_handler;
/* Saved register values */
u64 pre_isp;
};
static const struct cci_reg_sequence ov6211_400x400_120fps_mode[] = {
{ CCI_REG8(0x3005), 0x00 },
{ CCI_REG8(0x3013), 0x12 },
{ CCI_REG8(0x3014), 0x04 },
{ CCI_REG8(0x3016), 0x10 },
{ CCI_REG8(0x3017), 0x00 },
{ CCI_REG8(0x3018), 0x00 },
{ CCI_REG8(0x301a), 0x00 },
{ CCI_REG8(0x301b), 0x00 },
{ CCI_REG8(0x301c), 0x00 },
{ CCI_REG8(0x3037), 0xf0 },
{ CCI_REG8(0x3080), 0x01 },
{ CCI_REG8(0x3081), 0x00 },
{ CCI_REG8(0x3082), 0x01 },
{ CCI_REG8(0x3098), 0x04 },
{ CCI_REG8(0x3099), 0x28 },
{ CCI_REG8(0x309a), 0x06 },
{ CCI_REG8(0x309b), 0x04 },
{ CCI_REG8(0x309c), 0x00 },
{ CCI_REG8(0x309d), 0x00 },
{ CCI_REG8(0x309e), 0x01 },
{ CCI_REG8(0x309f), 0x00 },
{ CCI_REG8(0x30b0), 0x08 },
{ CCI_REG8(0x30b1), 0x02 },
{ CCI_REG8(0x30b2), 0x00 },
{ CCI_REG8(0x30b3), 0x28 },
{ CCI_REG8(0x30b4), 0x02 },
{ CCI_REG8(0x30b5), 0x00 },
{ CCI_REG8(0x3106), 0xd9 },
{ CCI_REG8(0x3503), 0x07 },
{ CCI_REG8(0x3509), 0x10 },
{ CCI_REG8(0x3600), 0xfc },
{ CCI_REG8(0x3620), 0xb7 },
{ CCI_REG8(0x3621), 0x05 },
{ CCI_REG8(0x3626), 0x31 },
{ CCI_REG8(0x3627), 0x40 },
{ CCI_REG8(0x3632), 0xa3 },
{ CCI_REG8(0x3633), 0x34 },
{ CCI_REG8(0x3634), 0x40 },
{ CCI_REG8(0x3636), 0x00 },
{ CCI_REG8(0x3660), 0x80 },
{ CCI_REG8(0x3662), 0x03 },
{ CCI_REG8(0x3664), 0xf0 },
{ CCI_REG8(0x366a), 0x10 },
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/module.h`, `linux/pm_runtime.h`, `linux/regulator/consumer.h`, `linux/units.h`.
- Detected declarations: `struct ov6211_reg_list`, `struct ov6211_mode`, `struct ov6211`, `function ov6211_set_test_pattern`, `function ov6211_set_ctrl`, `function ov6211_init_controls`, `function ov6211_update_pad_format`, `function ov6211_enable_streams`, `function ov6211_disable_streams`, `function ov6211_set_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.