← Documents Documentation/ABI/obsolete/sysfs-class-typec GitHub 원문 ↗

Linux 6.18.37 · ABI / obsolete

USB Type-C class obsolete ABI

Type-C alternate mode의 SVID, mode VDO, description, active 제어를 제공하던 class 경로와 bus 경로로의 이전을 설명합니다.

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

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

1. 요약·해설

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

Type-C alternate mode object

sysfs-class-typec:1-49

USB PD Discover Modes 결과를 mode directory로 표현하고 active attribute의 synchronous mode 전환, poll notification, KOBJ_CHANGE uevent를 정의합니다. 같은 ABI는 현재 /sys/bus/typec 아래에 있습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 These files are deprecated and will be removed. The same files are available
2 under /sys/bus/typec (see Documentation/ABI/testing/sysfs-bus-typec).
3
4 What: /sys/class/typec/<port|partner|cable>/<dev>/svid
5 Date: April 2017
6 Contact: Heikki Krogerus <[email protected]>
7 Description:
8 The SVID (Standard or Vendor ID) assigned by USB-IF for this
9 alternate mode.
10
11 What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/
12 Date: April 2017
13 Contact: Heikki Krogerus <[email protected]>
14 Description:
15 Every supported mode will have its own directory. The name of
16 a mode will be "mode<index>" (for example mode1), where <index>
17 is the actual index to the mode VDO returned by Discover Modes
18 USB power delivery command.
19
20 What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/description
21 Date: April 2017
22 Contact: Heikki Krogerus <[email protected]>
23 Description:
24 Shows description of the mode. The description is optional for
25 the drivers, just like with the Billboard Devices.
26
27 What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/vdo
28 Date: April 2017
29 Contact: Heikki Krogerus <[email protected]>
30 Description:
31 Shows the VDO in hexadecimal returned by Discover Modes command
32 for this mode.
33
34 What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/active
35 Date: April 2017
36 Contact: Heikki Krogerus <[email protected]>
37 Description:
38 Shows if the mode is active or not. The attribute can be used
39 for entering/exiting the mode with partners and cable plugs, and
40 with the port alternate modes it can be used for disabling
41 support for specific alternate modes. Entering/exiting modes is
42 supported as synchronous operation so write(2) to the attribute
43 does not return until the enter/exit mode operation has
44 finished. The attribute is notified when the mode is
45 entered/exited so poll(2) on the attribute wakes up.
46 Entering/exiting a mode will also generate uevent KOBJ_CHANGE.
47
48 Valid values: yes, no
49

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Type-C class 경로 폐기

1-3

이 file들은 deprecated 상태이며 제거될 예정이다. 같은 file은 /sys/bus/typec 아래에서 사용할 수 있다. 현재 interface는 Documentation/ABI/testing/sysfs-bus-typec를 참조한다.

SVID와 mode directory

4-18
항목
What/sys/class/typec/<port|partner|cable>/<dev>/svid
Date2017년 4월
ContactHeikki Krogerus <[email protected]>

svid는 이 alternate mode에 USB-IF가 할당한 Standard ID 또는 Vendor ID를 표시한다.

항목
What/sys/class/typec/<port|partner|cable>/<dev>/mode<index>/
Date2017년 4월
ContactHeikki Krogerus <[email protected]>

지원하는 mode마다 별도 directory가 있다. directory 이름은 mode1 같은 mode<index> 형식이며 index는 USB Power Delivery Discover Modes command가 반환한 mode VDO의 실제 index다.

Mode description과 VDO

20-32
경로의미
/sys/class/typec/<port|partner|cable>/<dev>/mode<index>/descriptionmode 설명
/sys/class/typec/<port|partner|cable>/<dev>/mode<index>/vdoDiscover Modes가 반환한 hexadecimal VDO

두 attribute는 2017년 4월에 정의되었고 contact는 Heikki Krogerus <[email protected]>이다. description은 Billboard Device에서와 마찬가지로 driver가 선택적으로 제공할 수 있다.

vdo는 해당 mode에 대해 Discover Modes command가 반환한 VDO를 hexadecimal로 표시한다.

Mode active attribute

34-49
항목
What/sys/class/typec/<port|partner|cable>/<dev>/mode<index>/active
Date2017년 4월
ContactHeikki Krogerus <[email protected]>
유효값yes, no

mode가 active인지 표시한다. partner와 cable plug에서는 mode 진입과 종료에 이 attribute를 사용하고, port alternate mode에서는 특정 alternate mode 지원을 비활성화하는 데도 사용할 수 있다.

mode 진입과 종료는 synchronous operation이다. attribute에 대한 write(2)는 enter 또는 exit operation이 끝날 때까지 반환하지 않는다.

mode가 진입하거나 종료되면 attribute notification이 발생하므로 이 attribute를 기다리는 poll(2)이 깨어난다. mode 진입과 종료는 KOBJ_CHANGE uevent도 생성한다.