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.

Dependency Surface

Detected Declarations

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

Implementation Notes