drivers/media/pci/netup_unidvb/netup_unidvb.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/netup_unidvb/netup_unidvb.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/netup_unidvb/netup_unidvb.h- Extension
.h- Size
- 3494 bytes
- Lines
- 135
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/i2c.hlinux/workqueue.hmedia/v4l2-common.hmedia/v4l2-device.hmedia/videobuf2-dvb.hmedia/dvb_ca_en50221.h
Detected Declarations
struct netup_dmastruct netup_i2c_regsstruct netup_i2cstruct netup_ci_statestruct netup_spistruct netup_unidvb_devenum netup_hw_revenum netup_i2c_state
Annotated Snippet
struct netup_dma {
u8 num;
spinlock_t lock;
struct netup_unidvb_dev *ndev;
struct netup_dma_regs __iomem *regs;
u32 ring_buffer_size;
u8 *addr_virt;
dma_addr_t addr_phys;
u64 addr_last;
u32 high_addr;
u32 data_offset;
u32 data_size;
struct list_head free_buffers;
struct work_struct work;
struct timer_list timeout;
};
enum netup_i2c_state {
STATE_DONE,
STATE_WAIT,
STATE_WANT_READ,
STATE_WANT_WRITE,
STATE_ERROR
};
struct netup_i2c_regs;
struct netup_i2c {
spinlock_t lock;
wait_queue_head_t wq;
struct i2c_adapter adap;
struct netup_unidvb_dev *dev;
struct netup_i2c_regs __iomem *regs;
struct i2c_msg *msg;
enum netup_i2c_state state;
u32 xmit_size;
};
struct netup_ci_state {
struct dvb_ca_en50221 ca;
u8 __iomem *membase8_config;
u8 __iomem *membase8_io;
struct netup_unidvb_dev *dev;
int status;
int nr;
};
struct netup_spi;
struct netup_unidvb_dev {
struct pci_dev *pci_dev;
int pci_bus;
int pci_slot;
int pci_func;
int board_num;
int old_fw;
u32 __iomem *lmmio0;
u8 __iomem *bmmio0;
u32 __iomem *lmmio1;
u8 __iomem *bmmio1;
u8 *dma_virt;
dma_addr_t dma_phys;
u32 dma_size;
struct vb2_dvb_frontends frontends[2];
struct netup_i2c i2c[2];
struct workqueue_struct *wq;
struct netup_dma dma[2];
struct netup_ci_state ci[2];
struct netup_spi *spi;
enum netup_hw_rev rev;
};
int netup_i2c_register(struct netup_unidvb_dev *ndev);
void netup_i2c_unregister(struct netup_unidvb_dev *ndev);
irqreturn_t netup_ci_interrupt(struct netup_unidvb_dev *ndev);
irqreturn_t netup_i2c_interrupt(struct netup_i2c *i2c);
irqreturn_t netup_spi_interrupt(struct netup_spi *spi);
int netup_unidvb_ci_register(struct netup_unidvb_dev *dev,
int num, struct pci_dev *pci_dev);
void netup_unidvb_ci_unregister(struct netup_unidvb_dev *dev, int num);
int netup_spi_init(struct netup_unidvb_dev *ndev);
void netup_spi_release(struct netup_unidvb_dev *ndev);
Annotation
- Immediate include surface: `linux/pci.h`, `linux/i2c.h`, `linux/workqueue.h`, `media/v4l2-common.h`, `media/v4l2-device.h`, `media/videobuf2-dvb.h`, `media/dvb_ca_en50221.h`.
- Detected declarations: `struct netup_dma`, `struct netup_i2c_regs`, `struct netup_i2c`, `struct netup_ci_state`, `struct netup_spi`, `struct netup_unidvb_dev`, `enum netup_hw_rev`, `enum netup_i2c_state`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source 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.