xref: /linux/Documentation/usb/functionfs-desc.rst (revision c7546e2c3cb739a3c1a2f5acaf9bb629d401afe5)
1======================
2FunctionFS Descriptors
3======================
4
5Some of the descriptors that can be written to the FFS gadget are
6described below. Device and configuration descriptors are handled
7by the composite gadget and are not written by the user to the
8FFS gadget.
9
10Descriptors are written to the "ep0" file in the FFS gadget
11following the descriptor header.
12
13.. kernel-doc:: include/uapi/linux/usb/functionfs.h
14   :doc: descriptors
15
16Interface Descriptors
17---------------------
18
19Standard USB interface descriptors may be written. The class/subclass of the
20most recent interface descriptor determines what type of class-specific
21descriptors are accepted.
22
23Class-Specific Descriptors
24--------------------------
25
26Class-specific descriptors are accepted only for the class/subclass of the
27most recent interface descriptor. The following are some of the
28class-specific descriptors that are supported.
29
30DFU Functional Descriptor
31~~~~~~~~~~~~~~~~~~~~~~~~~
32
33When the interface class is USB_CLASS_APP_SPEC and the interface subclass
34is USB_SUBCLASS_DFU, a DFU functional descriptor can be provided.
35The DFU functional descriptor is a described in the USB specification for
36Device Firmware Upgrade (DFU), version 1.1 as of this writing.
37
38.. kernel-doc:: include/uapi/linux/usb/functionfs.h
39   :doc: usb_dfu_functional_descriptor
40