drivers/media/usb/go7007/s2250-board.c
Source file repositories/reference/linux-study-clean/drivers/media/usb/go7007/s2250-board.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/usb/go7007/s2250-board.c- Extension
.c- Size
- 14484 bytes
- Lines
- 629
- 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/usb.hlinux/i2c.hlinux/videodev2.hlinux/slab.hmedia/v4l2-device.hmedia/v4l2-common.hmedia/v4l2-subdev.hgo7007-priv.h
Detected Declarations
struct go7007_usb_boardstruct go7007_usbstruct s2250function go7007_usb_vendor_requestfunction write_regfunction write_reg_fpfunction read_reg_fpfunction write_regsfunction write_regs_fpfunction s2250_s_video_routingfunction s2250_s_stdfunction s2250_s_ctrlfunction s2250_set_fmtfunction s2250_s_audio_routingfunction s2250_log_statusfunction s2250_probefunction s2250_remove
Annotated Snippet
struct go7007_usb_board {
unsigned int flags;
struct go7007_board_info main_info;
};
struct go7007_usb {
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;
};
static unsigned char aud_regs[] = {
0x1e, 0x00,
0x00, 0x17,
0x02, 0x17,
0x04, 0xf9,
0x06, 0xf9,
0x08, 0x02,
0x0a, 0x00,
0x0c, 0x00,
0x0a, 0x00,
0x0c, 0x00,
0x0e, 0x02,
0x10, 0x00,
0x12, 0x01,
0x00, 0x00,
};
static unsigned char vid_regs[] = {
0xF2, 0x0f,
0xAA, 0x00,
0xF8, 0xff,
0x00, 0x00,
};
static u16 vid_regs_fp[] = {
0x028, 0x067,
0x120, 0x016,
0x121, 0xcF2,
0x122, 0x0F2,
0x123, 0x00c,
0x124, 0x2d0,
0x125, 0x2e0,
0x126, 0x004,
0x128, 0x1E0,
0x12A, 0x016,
0x12B, 0x0F2,
0x12C, 0x0F2,
0x12D, 0x00c,
0x12E, 0x2d0,
0x12F, 0x2e0,
0x130, 0x004,
0x132, 0x1E0,
0x140, 0x060,
0x153, 0x00C,
0x154, 0x200,
0x150, 0x801,
0x000, 0x000
};
/* PAL specific values */
static u16 vid_regs_fp_pal[] = {
0x120, 0x017,
0x121, 0xd22,
0x122, 0x122,
0x12A, 0x017,
0x12B, 0x122,
0x12C, 0x122,
0x140, 0x060,
0x000, 0x000,
};
struct s2250 {
struct v4l2_subdev sd;
struct v4l2_ctrl_handler hdl;
v4l2_std_id std;
int input;
int brightness;
int contrast;
int saturation;
int hue;
int reg12b_val;
int audio_input;
struct i2c_client *audio;
};
Annotation
- Immediate include surface: `linux/module.h`, `linux/usb.h`, `linux/i2c.h`, `linux/videodev2.h`, `linux/slab.h`, `media/v4l2-device.h`, `media/v4l2-common.h`, `media/v4l2-subdev.h`.
- Detected declarations: `struct go7007_usb_board`, `struct go7007_usb`, `struct s2250`, `function go7007_usb_vendor_request`, `function write_reg`, `function write_reg_fp`, `function read_reg_fp`, `function write_regs`, `function write_regs_fp`, `function s2250_s_video_routing`.
- 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.