요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
These files are deprecated and will be removed. The same files are available
under /sys/bus/typec (see Documentation/ABI/testing/sysfs-bus-typec).
What: /sys/class/typec/<port|partner|cable>/<dev>/svid
Date: April 2017
Contact: Heikki Krogerus <[email protected]>
Description:
The SVID (Standard or Vendor ID) assigned by USB-IF for this
alternate mode.
What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/
Date: April 2017
Contact: Heikki Krogerus <[email protected]>
Description:
Every supported mode will have its own directory. The name of
a mode will be "mode<index>" (for example mode1), where <index>
is the actual index to the mode VDO returned by Discover Modes
USB power delivery command.
What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/description
Date: April 2017
Contact: Heikki Krogerus <[email protected]>
Description:
Shows description of the mode. The description is optional for
the drivers, just like with the Billboard Devices.
What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/vdo
Date: April 2017
Contact: Heikki Krogerus <[email protected]>
Description:
Shows the VDO in hexadecimal returned by Discover Modes command
for this mode.
What: /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/active
Date: April 2017
Contact: Heikki Krogerus <[email protected]>
Description:
Shows if the mode is active or not. The attribute can be used
for entering/exiting the mode with partners and cable plugs, and
with the port alternate modes it can be used for disabling
support for specific alternate modes. Entering/exiting modes is
supported as synchronous operation so write(2) to the attribute
does not return until the enter/exit mode operation has
finished. The attribute is notified when the mode is
entered/exited so poll(2) on the attribute wakes up.
Entering/exiting a mode will also generate uevent KOBJ_CHANGE.
Valid values: yes, no
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 |
| Date | 2017년 4월 |
| Contact | Heikki Krogerus <[email protected]> |
svid는 이 alternate mode에 USB-IF가 할당한 Standard ID 또는 Vendor ID를 표시한다.
| 항목 | 값 |
|---|---|
| What | /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/ |
| Date | 2017년 4월 |
| Contact | Heikki 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>/description | mode 설명 |
| /sys/class/typec/<port|partner|cable>/<dev>/mode<index>/vdo | Discover 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 |
| Date | 2017년 4월 |
| Contact | Heikki 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도 생성한다.
Type-C alternate mode object
sysfs-class-typec:1-49USB PD Discover Modes 결과를 mode directory로 표현하고 active attribute의 synchronous mode 전환, poll notification, KOBJ_CHANGE uevent를 정의합니다. 같은 ABI는 현재 /sys/bus/typec 아래에 있습니다.