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.

Dependency Surface

Detected Declarations

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

Implementation Notes