drivers/media/usb/em28xx/em28xx-cards.c

Source file repositories/reference/linux-study-clean/drivers/media/usb/em28xx/em28xx-cards.c

File Facts

System
Linux kernel
Corpus path
drivers/media/usb/em28xx/em28xx-cards.c
Extension
.c
Size
134514 bytes
Lines
4470
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 em28xx_hash_table {
	unsigned long hash;
	unsigned int  model;
	unsigned int  tuner;
};

static void em28xx_pre_card_setup(struct em28xx *dev);

/*
 *  Reset sequences for analog/digital modes
 */

/* Reset for the most [analog] boards */
static const struct em28xx_reg_seq default_analog[] = {
	{EM2820_R08_GPIO_CTRL,	0x6d,   ~EM_GPIO_4,	10},
	{	-1,		-1,	-1,		-1},
};

/* Reset for the most [digital] boards */
static const struct em28xx_reg_seq default_digital[] = {
	{EM2820_R08_GPIO_CTRL,	0x6e,	~EM_GPIO_4,	10},
	{	-1,		-1,	-1,		-1},
};

/* Board :Zolid Hybrid Tv Stick */
static struct em28xx_reg_seq zolid_tuner[] = {
	{EM2820_R08_GPIO_CTRL,		0xfd,		0xff,	100},
	{EM2820_R08_GPIO_CTRL,		0xfe,		0xff,	100},
	{		-1,					-1,			-1,		 -1},
};

static struct em28xx_reg_seq zolid_digital[] = {
	{EM2820_R08_GPIO_CTRL,		0x6a,		0xff,	100},
	{EM2820_R08_GPIO_CTRL,		0x7a,		0xff,	100},
	{EM2880_R04_GPO,			0x04,		0xff,	100},
	{EM2880_R04_GPO,			0x0c,		0xff,	100},
	{	-1,						-1,			-1,		 -1},
};

/* Board Hauppauge WinTV HVR 900 analog */
static const struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
	{EM2820_R08_GPIO_CTRL,	0x2d,	~EM_GPIO_4,	10},
	{	0x05,		0xff,	0x10,		10},
	{	-1,		-1,	-1,		-1},
};

/* Board Hauppauge WinTV HVR 900 digital */
static const struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
	{EM2820_R08_GPIO_CTRL,	0x2e,	~EM_GPIO_4,	10},
	{EM2880_R04_GPO,	0x04,	0x0f,		10},
	{EM2880_R04_GPO,	0x0c,	0x0f,		10},
	{	-1,		-1,	-1,		-1},
};

/* Board Hauppauge WinTV HVR 900 (R2) digital */
static const struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital[] = {
	{EM2820_R08_GPIO_CTRL,	0x2e,	~EM_GPIO_4,	10},
	{EM2880_R04_GPO,	0x0c,	0x0f,		10},
	{	-1,		-1,	-1,		-1},
};

/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
static const struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
	{EM2820_R08_GPIO_CTRL,	0x69,   ~EM_GPIO_4,	10},
	{	-1,		-1,	-1,		-1},
};

/* Board - EM2882 Kworld 315U digital */
static const struct em28xx_reg_seq em2882_kworld_315u_digital[] = {
	{EM2820_R08_GPIO_CTRL,	0xff,	0xff,		10},
	{EM2820_R08_GPIO_CTRL,	0xfe,	0xff,		10},
	{EM2880_R04_GPO,	0x04,	0xff,		10},
	{EM2880_R04_GPO,	0x0c,	0xff,		10},
	{EM2820_R08_GPIO_CTRL,	0x7e,	0xff,		10},
	{	-1,		-1,	-1,		-1},
};

static const struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio[] = {
	{EM2880_R04_GPO,	0x08,	0xff,		10},
	{EM2880_R04_GPO,	0x0c,	0xff,		10},
	{EM2880_R04_GPO,	0x08,	0xff,		10},
	{EM2880_R04_GPO,	0x0c,	0xff,		10},
	{	-1,		-1,	-1,		-1},
};

static const struct em28xx_reg_seq kworld_330u_analog[] = {
	{EM2820_R08_GPIO_CTRL,	0x6d,	~EM_GPIO_4,	10},
	{EM2880_R04_GPO,	0x00,	0xff,		10},
	{	-1,		-1,	-1,		-1},
};

Annotation

Implementation Notes