요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Speed, role과 connection
sysfs-class-udc:25-73Negotiated·maximum speed, OTG role switch, data pullup soft disconnect와 수동 SRP 시작을 다룹니다.
Controller state와 gadget function
sysfs-class-udc:75-93USB device state와 현재 실행 중인 USB Gadget Driver 이름을 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/udc/<udc>/a_alt_hnp_support
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates if an OTG A-Host supports HNP at an alternate port.
Users:
What: /sys/class/udc/<udc>/a_hnp_support
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates if an OTG A-Host supports HNP at this port.
Users:
What: /sys/class/udc/<udc>/b_hnp_enable
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates if an OTG A-Host enabled HNP support.
Users:
What: /sys/class/udc/<udc>/current_speed
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates the current negotiated speed at this port.
Users:
What: /sys/class/udc/<udc>/is_a_peripheral
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates that this port is the default Host on an OTG session
but HNP was used to switch roles.
Users:
What: /sys/class/udc/<udc>/is_otg
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates that this port support OTG.
Users:
What: /sys/class/udc/<udc>/maximum_speed
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates the maximum USB speed supported by this port.
Users:
What: /sys/class/udc/<udc>/soft_connect
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Allows users to disconnect data pullup resistors thus causing a
logical disconnection from the USB Host.
Users:
What: /sys/class/udc/<udc>/srp
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Allows users to manually start Session Request Protocol.
Users:
What: /sys/class/udc/<udc>/state
Date: June 2011
KernelVersion: 3.1
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Indicates current state of the USB Device Controller. Valid
states are: 'not-attached', 'attached', 'powered',
'reconnecting', 'unauthenticated', 'default', 'addressed',
'configured', and 'suspended'; however not all USB Device
Controllers support reporting all states.
Users:
What: /sys/class/udc/<udc>/function
Date: June 2017
KernelVersion: 4.13
Contact: Felipe Balbi <balbi@kernel.org>
Description:
Prints out name of currently running USB Gadget Driver.
Users:
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
OTG HNP capability
1-23아래 attribute는 2011년 6월 kernel 3.1에 도입됐고 담당자는 Felipe Balbi <balbi@kernel.org>다. 원문의 Users 항목은 비어 있다.
| 경로 | 의미 |
|---|---|
| /sys/class/udc/<udc>/a_alt_hnp_support | OTG A-Host가 alternate port에서 HNP를 지원하는지 나타낸다. |
| /sys/class/udc/<udc>/a_hnp_support | OTG A-Host가 이 port에서 HNP를 지원하는지 나타낸다. |
| /sys/class/udc/<udc>/b_hnp_enable | OTG A-Host가 HNP 지원을 활성화했는지 나타낸다. |
Speed, OTG role과 soft connection
25-73| 경로 | 의미 |
|---|---|
| /sys/class/udc/<udc>/current_speed | 이 port에서 현재 negotiation된 speed를 나타낸다. |
| /sys/class/udc/<udc>/is_a_peripheral | 이 port가 OTG session의 default Host였지만 HNP로 role을 전환했음을 나타낸다. |
| /sys/class/udc/<udc>/is_otg | 이 port가 OTG를 지원함을 나타낸다. |
| /sys/class/udc/<udc>/maximum_speed | 이 port가 지원하는 최대 USB speed를 나타낸다. |
| /sys/class/udc/<udc>/soft_connect | Data pullup resistor를 disconnect하여 USB Host로부터 logical disconnect를 일으킬 수 있다. |
| /sys/class/udc/<udc>/srp | Session Request Protocol을 수동으로 시작할 수 있다. |
이 항목들도 2011년 6월 kernel 3.1에 도입됐고 담당자는 Felipe Balbi다.
UDC state와 active gadget driver
75-93/sys/class/udc/<udc>/state는 2011년 6월 kernel 3.1에 도입됐으며 USB Device Controller의 현재 state를 나타낸다.
- not-attached
- attached
- powered
- reconnecting
- unauthenticated
- default
- addressed
- configured
- suspended
모든 USB Device Controller가 위 상태를 전부 보고할 수 있는 것은 아니다.
/sys/class/udc/<udc>/function은 2017년 6월 kernel 4.13에 도입됐으며 현재 실행 중인 USB Gadget Driver의 이름을 출력한다.
OTG와 protocol capability
sysfs-class-udc:1-23현재 또는 alternate port의 HNP 지원과 A-Host가 B-device HNP를 허용했는지 나타냅니다.