include/uapi/linux/usb/functionfs.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/usb/functionfs.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/usb/functionfs.h- Extension
.h- Size
- 16697 bytes
- Lines
- 418
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/const.hlinux/types.hlinux/ioctl.hlinux/usb/ch9.h
Detected Declarations
struct usb_endpoint_descriptor_no_audiostruct usb_dfu_functional_descriptorstruct usb_functionfs_descs_head_v2struct usb_functionfs_descs_headstruct usb_os_desc_headerstruct usb_ext_compat_descstruct usb_ext_prop_descstruct usb_ffs_dmabuf_transfer_reqstruct usb_functionfs_strings_headstruct usb_functionfs_eventenum functionfs_flagsenum usb_functionfs_event_type
Annotated Snippet
struct usb_endpoint_descriptor_no_audio {
__u8 bLength;
__u8 bDescriptorType;
__u8 bEndpointAddress;
__u8 bmAttributes;
__le16 wMaxPacketSize;
__u8 bInterval;
} __attribute__((packed));
/**
* struct usb_dfu_functional_descriptor - DFU Functional descriptor
* @bLength: Size of the descriptor (bytes)
* @bDescriptorType: USB_DT_DFU_FUNCTIONAL
* @bmAttributes: DFU attributes
* @wDetachTimeOut: Maximum time to wait after DFU_DETACH (ms, le16)
* @wTransferSize: Maximum number of bytes per control-write (le16)
* @bcdDFUVersion: DFU Spec version (BCD, le16)
*/
struct usb_dfu_functional_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bmAttributes;
__le16 wDetachTimeOut;
__le16 wTransferSize;
__le16 bcdDFUVersion;
} __attribute__ ((packed));
/* from DFU functional descriptor bmAttributes */
#define DFU_FUNC_ATT_CAN_DOWNLOAD _BITUL(0)
#define DFU_FUNC_ATT_CAN_UPLOAD _BITUL(1)
#define DFU_FUNC_ATT_MANIFEST_TOLERANT _BITUL(2)
#define DFU_FUNC_ATT_WILL_DETACH _BITUL(3)
struct usb_functionfs_descs_head_v2 {
__le32 magic;
__le32 length;
__le32 flags;
/*
* __le32 fs_count, hs_count, fs_count; must be included manually in
* the structure taking flags into consideration.
*/
} __attribute__((packed));
/* Legacy format, deprecated as of 3.14. */
struct usb_functionfs_descs_head {
__le32 magic;
__le32 length;
__le32 fs_count;
__le32 hs_count;
} __attribute__((packed, deprecated));
/* MS OS Descriptor header */
struct usb_os_desc_header {
__u8 interface;
__le32 dwLength;
__le16 bcdVersion;
__le16 wIndex;
union {
struct {
__u8 bCount;
__u8 Reserved;
};
__le16 wCount;
};
} __attribute__((packed));
struct usb_ext_compat_desc {
__u8 bFirstInterfaceNumber;
__u8 Reserved1;
__struct_group(/* no tag */, IDs, /* no attrs */,
__u8 CompatibleID[8];
__u8 SubCompatibleID[8];
);
__u8 Reserved2[6];
};
struct usb_ext_prop_desc {
__le32 dwSize;
__le32 dwPropertyDataType;
__le16 wPropertyNameLength;
} __attribute__((packed));
/* Flags for usb_ffs_dmabuf_transfer_req->flags (none for now) */
#define USB_FFS_DMABUF_TRANSFER_MASK 0x0
/**
* struct usb_ffs_dmabuf_transfer_req - Transfer request for a DMABUF object
* @fd: file descriptor of the DMABUF object
Annotation
- Immediate include surface: `linux/const.h`, `linux/types.h`, `linux/ioctl.h`, `linux/usb/ch9.h`.
- Detected declarations: `struct usb_endpoint_descriptor_no_audio`, `struct usb_dfu_functional_descriptor`, `struct usb_functionfs_descs_head_v2`, `struct usb_functionfs_descs_head`, `struct usb_os_desc_header`, `struct usb_ext_compat_desc`, `struct usb_ext_prop_desc`, `struct usb_ffs_dmabuf_transfer_req`, `struct usb_functionfs_strings_head`, `struct usb_functionfs_event`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.