← Documents Documentation/ABI/stable/sysfs-class-udc GitHub 원문 ↗

Linux 6.18.37 · ABI / stable

USB Device Controller class ABI

UDC의 OTG HNP·SRP capability, negotiated·maximum speed, role switch, soft disconnect, controller state와 active gadget driver를 설명합니다.

Source pathDocumentation/ABI/stable/sysfs-class-udc
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

OTG와 protocol capability

sysfs-class-udc:1-23

현재 또는 alternate port의 HNP 지원과 A-Host가 B-device HNP를 허용했는지 나타냅니다.

Speed, role과 connection

sysfs-class-udc:25-73

Negotiated·maximum speed, OTG role switch, data pullup soft disconnect와 수동 SRP 시작을 다룹니다.

Controller state와 gadget function

sysfs-class-udc:75-93

USB device state와 현재 실행 중인 USB Gadget Driver 이름을 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/class/udc/<udc>/a_alt_hnp_support
2 Date: June 2011
3 KernelVersion: 3.1
4 Contact: Felipe Balbi <balbi@kernel.org>
5 Description:
6 Indicates if an OTG A-Host supports HNP at an alternate port.
7 Users:
8
9 What: /sys/class/udc/<udc>/a_hnp_support
10 Date: June 2011
11 KernelVersion: 3.1
12 Contact: Felipe Balbi <balbi@kernel.org>
13 Description:
14 Indicates if an OTG A-Host supports HNP at this port.
15 Users:
16
17 What: /sys/class/udc/<udc>/b_hnp_enable
18 Date: June 2011
19 KernelVersion: 3.1
20 Contact: Felipe Balbi <balbi@kernel.org>
21 Description:
22 Indicates if an OTG A-Host enabled HNP support.
23 Users:
24
25 What: /sys/class/udc/<udc>/current_speed
26 Date: June 2011
27 KernelVersion: 3.1
28 Contact: Felipe Balbi <balbi@kernel.org>
29 Description:
30 Indicates the current negotiated speed at this port.
31 Users:
32
33 What: /sys/class/udc/<udc>/is_a_peripheral
34 Date: June 2011
35 KernelVersion: 3.1
36 Contact: Felipe Balbi <balbi@kernel.org>
37 Description:
38 Indicates that this port is the default Host on an OTG session
39 but HNP was used to switch roles.
40 Users:
41
42 What: /sys/class/udc/<udc>/is_otg
43 Date: June 2011
44 KernelVersion: 3.1
45 Contact: Felipe Balbi <balbi@kernel.org>
46 Description:
47 Indicates that this port support OTG.
48 Users:
49
50 What: /sys/class/udc/<udc>/maximum_speed
51 Date: June 2011
52 KernelVersion: 3.1
53 Contact: Felipe Balbi <balbi@kernel.org>
54 Description:
55 Indicates the maximum USB speed supported by this port.
56 Users:
57
58 What: /sys/class/udc/<udc>/soft_connect
59 Date: June 2011
60 KernelVersion: 3.1
61 Contact: Felipe Balbi <balbi@kernel.org>
62 Description:
63 Allows users to disconnect data pullup resistors thus causing a
64 logical disconnection from the USB Host.
65 Users:
66
67 What: /sys/class/udc/<udc>/srp
68 Date: June 2011
69 KernelVersion: 3.1
70 Contact: Felipe Balbi <balbi@kernel.org>
71 Description:
72 Allows users to manually start Session Request Protocol.
73 Users:
74
75 What: /sys/class/udc/<udc>/state
76 Date: June 2011
77 KernelVersion: 3.1
78 Contact: Felipe Balbi <balbi@kernel.org>
79 Description:
80 Indicates current state of the USB Device Controller. Valid
81 states are: 'not-attached', 'attached', 'powered',
82 'reconnecting', 'unauthenticated', 'default', 'addressed',
83 'configured', and 'suspended'; however not all USB Device
84 Controllers support reporting all states.
85 Users:
86
87 What: /sys/class/udc/<udc>/function
88 Date: June 2017
89 KernelVersion: 4.13
90 Contact: Felipe Balbi <balbi@kernel.org>
91 Description:
92 Prints out name of currently running USB Gadget Driver.
93 Users:
94

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_supportOTG A-Host가 alternate port에서 HNP를 지원하는지 나타낸다.
/sys/class/udc/<udc>/a_hnp_supportOTG A-Host가 이 port에서 HNP를 지원하는지 나타낸다.
/sys/class/udc/<udc>/b_hnp_enableOTG 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_connectData pullup resistor를 disconnect하여 USB Host로부터 logical disconnect를 일으킬 수 있다.
/sys/class/udc/<udc>/srpSession 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의 이름을 출력한다.