drivers/media/pci/cx88/cx88-cards.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/cx88/cx88-cards.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/cx88/cx88-cards.c- Extension
.c- Size
- 99227 bytes
- Lines
- 3857
- 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.
- 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
cx88.htea5767.hxc4000.hlinux/init.hlinux/module.hlinux/pci.hlinux/delay.hlinux/slab.h
Detected Declarations
function leadtek_eepromfunction hauppauge_eepromfunction gdi_eepromfunction cx88_dvico_xc2028_callbackfunction cx88_xc3028_geniatech_tuner_callbackfunction cx88_xc3028_winfast1800h_callbackfunction cx88_xc4000_winfast2000h_plus_callbackfunction cx88_pv_8000gt_callbackfunction dvico_fusionhdtv_hybrid_initfunction cx88_xc2028_tuner_callbackfunction cx88_xc4000_tuner_callbackfunction attachfunction cx88_tuner_callbackfunction cx88_card_listfunction cx88_card_setup_pre_i2cfunction cx88_setup_xc3028function cx88_card_setupfunction cx88_pci_quirksfunction cx88_get_resourcesexport cx88_tuner_callbackexport cx88_setup_xc3028
Annotated Snippet
switch (core->boardnr) {
case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
/* GPIO-4 xc3028 tuner */
cx_set(MO_GP0_IO, 0x00001000);
cx_clear(MO_GP0_IO, 0x00000010);
msleep(100);
cx_set(MO_GP0_IO, 0x00000010);
msleep(100);
break;
default:
cx_write(MO_GP0_IO, 0x101000);
mdelay(5);
cx_set(MO_GP0_IO, 0x101010);
}
break;
default:
return -EINVAL;
}
return 0;
}
/*
* some Geniatech specific stuff
*/
static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
int command, int mode)
{
switch (command) {
case XC2028_TUNER_RESET:
switch (INPUT(core->input).type) {
case CX88_RADIO:
break;
case CX88_VMUX_DVB:
cx_write(MO_GP1_IO, 0x030302);
mdelay(50);
break;
default:
cx_write(MO_GP1_IO, 0x030301);
mdelay(50);
}
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
cx_write(MO_GP1_IO, 0x101000);
mdelay(50);
cx_write(MO_GP1_IO, 0x101010);
mdelay(50);
return 0;
}
return -EINVAL;
}
static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
int command, int arg)
{
switch (command) {
case XC2028_TUNER_RESET:
/* GPIO 12 (xc3028 tuner reset) */
cx_set(MO_GP1_IO, 0x1010);
mdelay(50);
cx_clear(MO_GP1_IO, 0x10);
mdelay(75);
cx_set(MO_GP1_IO, 0x10);
mdelay(75);
return 0;
}
return -EINVAL;
}
static int cx88_xc4000_winfast2000h_plus_callback(struct cx88_core *core,
int command, int arg)
{
switch (command) {
case XC4000_TUNER_RESET:
/* GPIO 12 (xc4000 tuner reset) */
cx_set(MO_GP1_IO, 0x1010);
mdelay(50);
cx_clear(MO_GP1_IO, 0x10);
mdelay(75);
cx_set(MO_GP1_IO, 0x10);
mdelay(75);
return 0;
}
return -EINVAL;
}
/*
* some Divco specific stuff
Annotation
- Immediate include surface: `cx88.h`, `tea5767.h`, `xc4000.h`, `linux/init.h`, `linux/module.h`, `linux/pci.h`, `linux/delay.h`, `linux/slab.h`.
- Detected declarations: `function leadtek_eeprom`, `function hauppauge_eeprom`, `function gdi_eeprom`, `function cx88_dvico_xc2028_callback`, `function cx88_xc3028_geniatech_tuner_callback`, `function cx88_xc3028_winfast1800h_callback`, `function cx88_xc4000_winfast2000h_plus_callback`, `function cx88_pv_8000gt_callback`, `function dvico_fusionhdtv_hybrid_init`, `function cx88_xc2028_tuner_callback`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration implementation candidate.
- 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.