drivers/media/pci/tw68/tw68.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/tw68/tw68.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/tw68/tw68.h- Extension
.h- Size
- 5483 bytes
- Lines
- 206
- 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/pci.hlinux/videodev2.hlinux/notifier.hlinux/delay.hlinux/mutex.hlinux/io.hmedia/v4l2-common.hmedia/v4l2-ioctl.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/videobuf2-v4l2.hmedia/videobuf2-dma-sg.htw68-reg.h
Detected Declarations
struct tw68_tvnormstruct tw68_formatstruct tw68_devstruct tw68_bufstruct tw68_fmtstruct tw68_devenum tw68_decoder_typefunction writel
Annotated Snippet
struct tw68_tvnorm {
char *name;
v4l2_std_id id;
/* video decoder */
u32 sync_control;
u32 luma_control;
u32 chroma_ctrl1;
u32 chroma_gain;
u32 chroma_ctrl2;
u32 vgate_misc;
/* video scaler */
u32 h_delay;
u32 h_delay0; /* for TW6800 */
u32 h_start;
u32 h_stop;
u32 v_delay;
u32 video_v_start;
u32 video_v_stop;
u32 vbi_v_start_0;
u32 vbi_v_stop_0;
u32 vbi_v_start_1;
/* Techwell specific */
u32 format;
};
struct tw68_format {
u32 fourcc;
u32 depth;
u32 twformat;
};
/* ----------------------------------------------------------- */
/* card configuration */
#define TW68_BOARD_NOAUTO UNSET
#define TW68_BOARD_UNKNOWN 0
#define TW68_BOARD_GENERIC_6802 1
#define TW68_MAXBOARDS 16
#define TW68_INPUT_MAX 4
/* ----------------------------------------------------------- */
/* device / file handle status */
#define BUFFER_TIMEOUT msecs_to_jiffies(500) /* 0.5 seconds */
struct tw68_dev; /* forward delclaration */
/* buffer for one video/vbi/ts frame */
struct tw68_buf {
struct vb2_v4l2_buffer vb;
struct list_head list;
unsigned int size;
__le32 *cpu;
__le32 *jmp;
dma_addr_t dma;
};
struct tw68_fmt {
char *name;
u32 fourcc; /* v4l2 format id */
int depth;
int flags;
u32 twformat;
};
/* global device status */
struct tw68_dev {
struct mutex lock;
spinlock_t slock;
u16 instance;
struct v4l2_device v4l2_dev;
/* various device info */
enum tw68_decoder_type vdecoder;
struct video_device vdev;
struct v4l2_ctrl_handler hdl;
/* pci i/o */
char *name;
struct pci_dev *pci;
unsigned char pci_rev, pci_lat;
u32 __iomem *lmmio;
u8 __iomem *bmmio;
u32 pci_irqmask;
/* The irq mask to be used will depend upon the chip type */
Annotation
- Immediate include surface: `linux/pci.h`, `linux/videodev2.h`, `linux/notifier.h`, `linux/delay.h`, `linux/mutex.h`, `linux/io.h`, `media/v4l2-common.h`, `media/v4l2-ioctl.h`.
- Detected declarations: `struct tw68_tvnorm`, `struct tw68_format`, `struct tw68_dev`, `struct tw68_buf`, `struct tw68_fmt`, `struct tw68_dev`, `enum tw68_decoder_type`, `function writel`.
- 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.