drivers/media/dvb-frontends/stv6111.c

Source file repositories/reference/linux-study-clean/drivers/media/dvb-frontends/stv6111.c

File Facts

System
Linux kernel
Corpus path
drivers/media/dvb-frontends/stv6111.c
Extension
.c
Size
14007 bytes
Lines
682
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: exported/initcall integration point
Status
integration 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 stv {
	struct i2c_adapter *i2c;
	u8 adr;

	u8 reg[11];
	u32 ref_freq;
	u32 frequency;
};

struct slookup {
	s16 value;
	u16 reg_value;
};

static const struct slookup lnagain_nf_lookup[] = {
	/* Gain *100dB // Reg */
	{ 2572,	0 },
	{ 2575, 1 },
	{ 2580, 2 },
	{ 2588, 3 },
	{ 2596, 4 },
	{ 2611, 5 },
	{ 2633, 6 },
	{ 2664, 7 },
	{ 2701, 8 },
	{ 2753, 9 },
	{ 2816, 10 },
	{ 2902, 11 },
	{ 2995, 12 },
	{ 3104, 13 },
	{ 3215, 14 },
	{ 3337, 15 },
	{ 3492, 16 },
	{ 3614, 17 },
	{ 3731, 18 },
	{ 3861, 19 },
	{ 3988, 20 },
	{ 4124, 21 },
	{ 4253, 22 },
	{ 4386,	23 },
	{ 4505,	24 },
	{ 4623,	25 },
	{ 4726,	26 },
	{ 4821,	27 },
	{ 4903,	28 },
	{ 4979,	29 },
	{ 5045,	30 },
	{ 5102,	31 }
};

static const struct slookup lnagain_iip3_lookup[] = {
	/* Gain *100dB // reg */
	{ 1548,	0 },
	{ 1552,	1 },
	{ 1569,	2 },
	{ 1565,	3 },
	{ 1577,	4 },
	{ 1594,	5 },
	{ 1627,	6 },
	{ 1656,	7 },
	{ 1700,	8 },
	{ 1748,	9 },
	{ 1805,	10 },
	{ 1896,	11 },
	{ 1995,	12 },
	{ 2113,	13 },
	{ 2233,	14 },
	{ 2366,	15 },
	{ 2543,	16 },
	{ 2687,	17 },
	{ 2842,	18 },
	{ 2999,	19 },
	{ 3167,	20 },
	{ 3342,	21 },
	{ 3507,	22 },
	{ 3679,	23 },
	{ 3827,	24 },
	{ 3970,	25 },
	{ 4094,	26 },
	{ 4210,	27 },
	{ 4308,	28 },
	{ 4396,	29 },
	{ 4468,	30 },
	{ 4535,	31 }
};

static const struct slookup gain_rfagc_lookup[] = {
	/* Gain *100dB // reg */
	{ 4870,	0x3000 },
	{ 4850,	0x3C00 },

Annotation

Implementation Notes