drivers/media/usb/go7007/go7007-usb.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/go7007/go7007-usb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/go7007/go7007-usb.c- Extension
.c- Size
- 35324 bytes
- Lines
- 1357
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
linux/module.hlinux/kernel.hlinux/wait.hlinux/list.hlinux/slab.hlinux/time.hlinux/mm.hlinux/usb.hlinux/i2c.hasm/byteorder.hmedia/i2c/saa7115.hmedia/tuner.hmedia/i2c/uda1342.hgo7007-priv.h
Detected Declarations
struct go7007_usb_boardstruct go7007_usbfunction go7007_usb_vendor_requestfunction go7007_usb_interface_resetfunction go7007_usb_ezusb_write_interruptfunction go7007_usb_onboard_write_interruptfunction go7007_usb_readinterrupt_completefunction go7007_usb_read_interruptfunction go7007_usb_read_video_pipe_completefunction go7007_usb_read_audio_pipe_completefunction go7007_usb_stream_startfunction go7007_usb_stream_stopfunction go7007_usb_send_firmwarefunction go7007_usb_releasefunction go7007_usb_i2c_master_xferfunction go7007_usb_functionalityfunction go7007_usb_probefunction go7007_usb_disconnect
Annotated Snippet
struct go7007_usb_board {
unsigned int flags;
struct go7007_board_info main_info;
};
struct go7007_usb {
const struct go7007_usb_board *board;
struct mutex i2c_lock;
struct usb_device *usbdev;
struct urb *video_urbs[8];
struct urb *audio_urbs[8];
struct urb *intr_urb;
};
/*********************** Product specification data ***********************/
static const struct go7007_usb_board board_matrix_ii = {
.flags = GO7007_USB_EZUSB,
.main_info = {
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_WORD_16,
.audio_rate = 48000,
.audio_bclk_div = 8,
.audio_main_div = 2,
.hpi_buffer_cap = 7,
.sensor_flags = GO7007_SENSOR_656 |
GO7007_SENSOR_VALID_ENABLE |
GO7007_SENSOR_TV |
GO7007_SENSOR_SAA7115 |
GO7007_SENSOR_VBI |
GO7007_SENSOR_SCALING,
.num_i2c_devs = 1,
.i2c_devs = {
{
.type = "saa7115",
.addr = 0x20,
.is_video = 1,
},
},
.num_inputs = 2,
.inputs = {
{
.video_input = 0,
.name = "Composite",
},
{
.video_input = 9,
.name = "S-Video",
},
},
.video_config = SAA7115_IDQ_IS_DEFAULT,
},
};
static const struct go7007_usb_board board_matrix_reload = {
.flags = GO7007_USB_EZUSB,
.main_info = {
.flags = GO7007_BOARD_HAS_AUDIO |
GO7007_BOARD_USE_ONBOARD_I2C,
.audio_flags = GO7007_AUDIO_I2S_MODE_1 |
GO7007_AUDIO_I2S_MASTER |
GO7007_AUDIO_WORD_16,
.audio_rate = 48000,
.audio_bclk_div = 8,
.audio_main_div = 2,
.hpi_buffer_cap = 7,
.sensor_flags = GO7007_SENSOR_656 |
GO7007_SENSOR_TV,
.num_i2c_devs = 1,
.i2c_devs = {
{
.type = "saa7113",
.addr = 0x25,
.is_video = 1,
},
},
.num_inputs = 2,
.inputs = {
{
.video_input = 0,
.name = "Composite",
},
{
.video_input = 9,
.name = "S-Video",
},
},
.video_config = SAA7115_IDQ_IS_DEFAULT,
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/wait.h`, `linux/list.h`, `linux/slab.h`, `linux/time.h`, `linux/mm.h`, `linux/usb.h`.
- Detected declarations: `struct go7007_usb_board`, `struct go7007_usb`, `function go7007_usb_vendor_request`, `function go7007_usb_interface_reset`, `function go7007_usb_ezusb_write_interrupt`, `function go7007_usb_onboard_write_interrupt`, `function go7007_usb_readinterrupt_complete`, `function go7007_usb_read_interrupt`, `function go7007_usb_read_video_pipe_complete`, `function go7007_usb_read_audio_pipe_complete`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.