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.
- 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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
em28xx.hlinux/init.hlinux/module.hlinux/slab.hlinux/delay.hlinux/i2c.hlinux/usb.hmedia/tuner.hmedia/drv-intf/msp3400.hmedia/i2c/saa7115.hdt-bindings/media/tvp5150.hmedia/i2c/tvaudio.hmedia/tveeprom.hmedia/v4l2-common.hsound/ac97_codec.h
Detected Declarations
struct em28xx_hash_tablefunction em28xx_tuner_callbackfunction em28xx_set_xclk_i2c_speedfunction em28xx_set_modelfunction em28xx_wait_until_ac97_features_equalsfunction em28xx_pre_card_setupfunction em28xx_hint_boardfunction em28xx_card_setupfunction em28xx_setup_xc3028function request_module_asyncfunction request_modulesfunction flush_request_modulesfunction em28xx_media_device_initfunction em28xx_unregister_media_devicefunction em28xx_release_resourcesfunction em28xx_free_devicefunction em28xx_init_devfunction em28xx_duplicate_devfunction em28xx_check_usb_descriptorfunction em28xx_usb_probefunction em28xx_usb_disconnectfunction em28xx_usb_suspendfunction em28xx_usb_resumeexport em28xx_boardsexport em28xx_tuner_callbackexport em28xx_setup_xc3028export em28xx_free_device
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
- Immediate include surface: `em28xx.h`, `linux/init.h`, `linux/module.h`, `linux/slab.h`, `linux/delay.h`, `linux/i2c.h`, `linux/usb.h`, `media/tuner.h`.
- Detected declarations: `struct em28xx_hash_table`, `function em28xx_tuner_callback`, `function em28xx_set_xclk_i2c_speed`, `function em28xx_set_model`, `function em28xx_wait_until_ac97_features_equals`, `function em28xx_pre_card_setup`, `function em28xx_hint_board`, `function em28xx_card_setup`, `function em28xx_setup_xc3028`, `function request_module_async`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.