요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
======================
FunctionFS Descriptors
======================
Some of the descriptors that can be written to the FFS gadget are
described below. Device and configuration descriptors are handled
by the composite gadget and are not written by the user to the
FFS gadget.
Descriptors are written to the "ep0" file in the FFS gadget
following the descriptor header.
.. kernel-doc:: include/uapi/linux/usb/functionfs.h
:doc: descriptors
Interface Descriptors
---------------------
Standard USB interface descriptors may be written. The class/subclass of the
most recent interface descriptor determines what type of class-specific
descriptors are accepted.
Class-Specific Descriptors
--------------------------
Class-specific descriptors are accepted only for the class/subclass of the
most recent interface descriptor. The following are some of the
class-specific descriptors that are supported.
DFU Functional Descriptor
~~~~~~~~~~~~~~~~~~~~~~~~~
When the interface class is USB_CLASS_APP_SPEC and the interface subclass
is USB_SUBCLASS_DFU, a DFU functional descriptor can be provided.
The DFU functional descriptor is a described in the USB specification for
Device Firmware Upgrade (DFU), version 1.1 as of this writing.
.. kernel-doc:: include/uapi/linux/usb/functionfs.h
:doc: usb_dfu_functional_descriptor
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
제목
1-4이 문서는 FunctionFS(FFS) gadget에 전달할 수 있는 descriptor를 설명합니다.
======================
FunctionFS Descriptors
======================
Descriptor 소유권과 ep0 기록
5-11FFS gadget에 쓸 수 있는 descriptor 가운데 일부를 설명합니다. Device descriptor와 configuration descriptor는 composite gadget이 처리하므로 사용자가 FFS gadget에 직접 쓰지 않습니다.
사용자가 제공하는 descriptor는 descriptor header 뒤에 이어서 FFS gadget의 `ep0` file에 기록합니다.
Composite gadget이 만드는 항목과 user space가 ep0에 쓰는 항목을 구분합니다.
Some of the descriptors that can be written to the FFS gadget are
described below. Device and configuration descriptors are handled
by the composite gadget and are not written by the user to the
FFS gadget.
Descriptors are written to the "ep0" file in the FFS gadget
following the descriptor header.
Descriptor UAPI 정의
12-15일반 descriptor 형식은 `include/uapi/linux/usb/functionfs.h`의 kernel-doc `descriptors` 절에 정의됩니다.
.. kernel-doc:: include/uapi/linux/usb/functionfs.h
:doc: descriptors
Interface descriptor
16-22표준 USB interface descriptor를 쓸 수 있습니다.
가장 최근에 기록한 interface descriptor의 class/subclass가 뒤이어 허용되는 class-specific descriptor 유형을 결정합니다.
Interface Descriptors
---------------------
Standard USB interface descriptors may be written. The class/subclass of the
most recent interface descriptor determines what type of class-specific
descriptors are accepted.
Class-specific descriptor
23-29Class-specific descriptor는 가장 최근 interface descriptor의 class/subclass와 일치하는 경우에만 받아들여집니다. 문서는 지원되는 class-specific descriptor 일부를 이어서 제시합니다.
최근 interface descriptor가 후속 descriptor의 해석 context를 제공합니다.
Class-Specific Descriptors
--------------------------
Class-specific descriptors are accepted only for the class/subclass of the
most recent interface descriptor. The following are some of the
class-specific descriptors that are supported.
DFU functional descriptor
30-39Interface class가 `USB_CLASS_APP_SPEC`이고 interface subclass가 `USB_SUBCLASS_DFU`이면 DFU functional descriptor를 제공할 수 있습니다.
이 descriptor는 Device Firmware Upgrade(DFU) USB specification에 정의되며 문서 작성 당시 기준 version은 1.1입니다.
구조체 세부 정의는 `include/uapi/linux/usb/functionfs.h`의 kernel-doc `usb_dfu_functional_descriptor` 절에서 가져옵니다.
DFU Functional Descriptor
~~~~~~~~~~~~~~~~~~~~~~~~~
When the interface class is USB_CLASS_APP_SPEC and the interface subclass
is USB_SUBCLASS_DFU, a DFU functional descriptor can be provided.
The DFU functional descriptor is a described in the USB specification for
Device Firmware Upgrade (DFU), version 1.1 as of this writing.
.. kernel-doc:: include/uapi/linux/usb/functionfs.h
:doc: usb_dfu_functional_descriptor
요약·해설
functionfs-desc.rst:1-39FunctionFS user space는 device/configuration descriptor를 만들지 않고 interface 및 허용된 class-specific descriptor를 header 뒤에 `ep0`로 전달합니다. 후속 descriptor의 유효성은 바로 앞 interface의 class/subclass context로 판정되며 DFU는 `USB_CLASS_APP_SPEC`과 `USB_SUBCLASS_DFU` 조합에서 허용됩니다.