drivers/media/pci/saa7164/saa7164-cards.c
Source file repositories/reference/linux-study-clean/drivers/media/pci/saa7164/saa7164-cards.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/saa7164/saa7164-cards.c- Extension
.c- Size
- 26002 bytes
- Lines
- 944
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hlinux/pci.hlinux/delay.hsaa7164.h
Detected Declarations
function saa7164_card_listfunction saa7164_gpio_setupfunction hauppauge_eepromfunction saa7164_card_setupfunction saa7164_i2caddr_to_unitidfunction saa7164_i2caddr_to_reglen
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Driver for the NXP SAA7164 PCIe bridge
*
* Copyright (c) 2010-2015 Steven Toth <stoth@kernellabs.com>
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include "saa7164.h"
/* The Bridge API needs to understand register widths (in bytes) for the
* attached I2C devices, so we can simplify the virtual i2c mechansms
* and keep the -i2c.c implementation clean.
*/
#define REGLEN_0bit 0
#define REGLEN_8bit 1
#define REGLEN_16bit 2
struct saa7164_board saa7164_boards[] = {
[SAA7164_BOARD_UNKNOWN] = {
/* Bridge will not load any firmware, without knowing
* the rev this would be fatal. */
.name = "Unknown",
},
[SAA7164_BOARD_UNKNOWN_REV2] = {
/* Bridge will load the v2 f/w and dump descriptors */
/* Required during new board bringup */
.name = "Generic Rev2",
.chiprev = SAA7164_CHIP_REV2,
},
[SAA7164_BOARD_UNKNOWN_REV3] = {
/* Bridge will load the v2 f/w and dump descriptors */
/* Required during new board bringup */
.name = "Generic Rev3",
.chiprev = SAA7164_CHIP_REV3,
},
[SAA7164_BOARD_HAUPPAUGE_HVR2200] = {
.name = "Hauppauge WinTV-HVR2200",
.porta = SAA7164_MPEG_DVB,
.portb = SAA7164_MPEG_DVB,
.portc = SAA7164_MPEG_ENCODER,
.portd = SAA7164_MPEG_ENCODER,
.porte = SAA7164_MPEG_VBI,
.portf = SAA7164_MPEG_VBI,
.chiprev = SAA7164_CHIP_REV3,
.unit = {{
.id = 0x1d,
.type = SAA7164_UNIT_EEPROM,
.name = "4K EEPROM",
.i2c_bus_nr = SAA7164_I2C_BUS_0,
.i2c_bus_addr = 0xa0 >> 1,
.i2c_reg_len = REGLEN_8bit,
}, {
.id = 0x04,
.type = SAA7164_UNIT_TUNER,
.name = "TDA18271-1",
.i2c_bus_nr = SAA7164_I2C_BUS_1,
.i2c_bus_addr = 0xc0 >> 1,
.i2c_reg_len = REGLEN_8bit,
}, {
.id = 0x1b,
.type = SAA7164_UNIT_TUNER,
.name = "TDA18271-2",
.i2c_bus_nr = SAA7164_I2C_BUS_2,
.i2c_bus_addr = 0xc0 >> 1,
.i2c_reg_len = REGLEN_8bit,
}, {
.id = 0x1e,
.type = SAA7164_UNIT_DIGITAL_DEMODULATOR,
.name = "TDA10048-1",
.i2c_bus_nr = SAA7164_I2C_BUS_1,
.i2c_bus_addr = 0x10 >> 1,
.i2c_reg_len = REGLEN_8bit,
}, {
.id = 0x1f,
.type = SAA7164_UNIT_DIGITAL_DEMODULATOR,
.name = "TDA10048-2",
.i2c_bus_nr = SAA7164_I2C_BUS_2,
.i2c_bus_addr = 0x12 >> 1,
.i2c_reg_len = REGLEN_8bit,
} },
},
[SAA7164_BOARD_HAUPPAUGE_HVR2200_2] = {
.name = "Hauppauge WinTV-HVR2200",
.porta = SAA7164_MPEG_DVB,
.portb = SAA7164_MPEG_DVB,
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/pci.h`, `linux/delay.h`, `saa7164.h`.
- Detected declarations: `function saa7164_card_list`, `function saa7164_gpio_setup`, `function hauppauge_eeprom`, `function saa7164_card_setup`, `function saa7164_i2caddr_to_unitid`, `function saa7164_i2caddr_to_reglen`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.