drivers/usb/gadget/function/uvc_configfs.h
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/function/uvc_configfs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/function/uvc_configfs.h- Extension
.h- Size
- 4585 bytes
- Lines
- 196
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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/configfs.hu_uvc.h
Detected Declarations
struct uvcg_control_headerstruct uvcg_color_matchingstruct uvcg_formatstruct uvcg_format_ptrstruct uvcg_streaming_headerstruct uvcg_frame_ptrstruct uvcg_framestruct uvcg_uncompressedstruct uvcg_mjpegstruct uvcg_framebasedstruct uvcg_extension_unit_descriptorstruct uvcg_extensionenum uvcg_format_typefunction Copyright
Annotated Snippet
struct uvcg_control_header {
struct config_item item;
struct UVC_HEADER_DESCRIPTOR(1) desc;
unsigned linked;
};
static inline struct uvcg_control_header *to_uvcg_control_header(struct config_item *item)
{
return container_of(item, struct uvcg_control_header, item);
}
struct uvcg_color_matching {
struct config_group group;
struct uvc_color_matching_descriptor desc;
unsigned int refcnt;
};
#define to_uvcg_color_matching(group_ptr) \
container_of(group_ptr, struct uvcg_color_matching, group)
enum uvcg_format_type {
UVCG_UNCOMPRESSED = 0,
UVCG_MJPEG,
UVCG_FRAMEBASED,
};
struct uvcg_format {
struct config_group group;
enum uvcg_format_type type;
unsigned linked;
struct list_head frames;
unsigned num_frames;
__u8 bmaControls[UVCG_STREAMING_CONTROL_SIZE];
struct uvcg_color_matching *color_matching;
};
struct uvcg_format_ptr {
struct uvcg_format *fmt;
struct list_head entry;
};
static inline struct uvcg_format *to_uvcg_format(struct config_item *item)
{
return container_of(to_config_group(item), struct uvcg_format, group);
}
struct uvcg_streaming_header {
struct config_item item;
unsigned linked;
struct list_head formats;
unsigned num_fmt;
/* Must be last --ends in a flexible-array member. */
struct uvc_input_header_descriptor desc;
};
static inline struct uvcg_streaming_header *to_uvcg_streaming_header(struct config_item *item)
{
return container_of(item, struct uvcg_streaming_header, item);
}
struct uvcg_frame_ptr {
struct uvcg_frame *frm;
struct list_head entry;
};
struct uvcg_frame {
struct config_item item;
enum uvcg_format_type fmt_type;
struct {
u8 b_length;
u8 b_descriptor_type;
u8 b_descriptor_subtype;
u8 b_frame_index;
u8 bm_capabilities;
u16 w_width;
u16 w_height;
u32 dw_min_bit_rate;
u32 dw_max_bit_rate;
u32 dw_max_video_frame_buffer_size;
u32 dw_default_frame_interval;
u8 b_frame_interval_type;
u32 dw_bytes_perline;
} __attribute__((packed)) frame;
u32 *dw_frame_interval;
};
static inline struct uvcg_frame *to_uvcg_frame(struct config_item *item)
{
return container_of(item, struct uvcg_frame, item);
Annotation
- Immediate include surface: `linux/configfs.h`, `u_uvc.h`.
- Detected declarations: `struct uvcg_control_header`, `struct uvcg_color_matching`, `struct uvcg_format`, `struct uvcg_format_ptr`, `struct uvcg_streaming_header`, `struct uvcg_frame_ptr`, `struct uvcg_frame`, `struct uvcg_uncompressed`, `struct uvcg_mjpeg`, `struct uvcg_framebased`.
- Atlas domain: Driver Families / drivers/usb.
- 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.