요약·해설, 영어 원문, 전체 번역을 구분해 실었습니다. API 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.
1. 요약·해설
원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.
2. 영어 원문 전체
번역에 사용한 Linux v6.18.37 원문입니다. 줄 번호는 해당 버전의 소스 파일을 기준으로 합니다.
원문 전체 펼치기
1
What: /config/usb-gadget/gadget/functions/ffs.name
2
Date: Nov 2013
3
KernelVersion: 3.13
4
Description: The purpose of this directory is to create and remove it.
6
A corresponding USB function instance is created/removed.
8
All attributes are read only:
10
============= ============================================
11
ready 1 if the function is ready to be used, E.G.
12
if userspace has written descriptors and
13
strings to ep0, so the gadget can be
14
enabled - 0 otherwise.
15
============= ============================================
17
All other parameters are set through FunctionFS.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.
FunctionFS USB function instance 생성과 ready 상태
1-17| 항목 | 내용 |
|---|---|
| What | /config/usb-gadget/gadget/functions/ffs.name |
| Date | 2013년 11월 |
| KernelVersion | 3.13 |
| Directory operation | 이 directory의 목적은 생성하고 제거하는 것이다. 대응하는 USB function instance가 함께 생성되거나 제거된다. |
모든 attribute는 read-only이다.
| Attribute | 설명 |
|---|---|
| ready | Function을 사용할 준비가 되었으면 1, 아니면 0이다. 예를 들어 userspace가 ep0에 descriptor와 string을 써서 gadget을 활성화할 수 있게 되면 1이다. |
그 밖의 모든 parameter는 FunctionFS를 통해 설정한다.
ffs.name directory 생성→USB FunctionFS function instance 생성→ready = 0→Userspace가 ep0에 descriptor와 string 기록→ready = 1→Gadget 활성화 가능
기타 function parameter→FunctionFS에서 설정
ffs.name directory 제거→대응 USB function instance 제거
Configfs는 function instance의 lifetime과 readiness 관찰을 담당하고, 실제 descriptor 및 기타 parameter는 FunctionFS 경로에서 공급한다.
FunctionFS instance lifetime과 readiness
configfs-usb-gadget-ffs:1-17ffs.name directory를 만들거나 제거하면 대응하는 USB function instance가 생성·제거되며, userspace가 ep0 초기화를 마치면 ready가 1이 됩니다.