요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=====================================================
Intel INT3496 ACPI device extcon driver documentation
=====================================================
The Intel INT3496 ACPI device extcon driver is a driver for ACPI
devices with an acpi-id of INT3496, such as found for example on
Intel Baytrail and Cherrytrail tablets.
This ACPI device describes how the OS can read the id-pin of the devices'
USB-otg port, as well as how it optionally can enable Vbus output on the
otg port and how it can optionally control the muxing of the data pins
between an USB host and an USB peripheral controller.
The ACPI devices exposes this functionality by returning an array with up
to 3 gpio descriptors from its ACPI _CRS (Current Resource Settings) call:
======= =====================================================================
Index 0 The input gpio for the id-pin, this is always present and valid
Index 1 The output gpio for enabling Vbus output from the device to the otg
port, write 1 to enable the Vbus output (this gpio descriptor may
be absent or invalid)
Index 2 The output gpio for muxing of the data pins between the USB host and
the USB peripheral controller, write 1 to mux to the peripheral
controller
======= =====================================================================
There is a mapping between indices and GPIO connection IDs as follows
======= =======
id index 0
vbus index 1
mux index 2
======= =======
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
INT3496 extcon driver의 역할
1-16Intel INT3496 ACPI device extcon driver는 ACPI ID가 `INT3496`인 device를 위한 driver다. 이러한 device는 Intel Baytrail 및 Cherrytrail tablet 등에서 찾아볼 수 있다.
INT3496 ACPI device는 OS가 device의 USB OTG port에서 ID pin을 읽는 방법을 기술한다. ID pin은 OTG 연결 역할을 판별하는 입력이며 이 기능은 항상 제공된다.
Firmware가 resource를 제공하는 경우에는 OTG port로 내보내는 Vbus output을 켜는 방법도 기술한다. 또한 USB host controller와 USB peripheral controller 사이에서 data pin의 mux 방향을 전환하는 방법도 선택적으로 제공할 수 있다.
이 기능은 ACPI `_CRS` 즉 Current Resource Settings가 최대 세 개의 GPIO descriptor 배열을 반환하는 방식으로 노출된다. 각 descriptor의 의미는 배열 index로 정해지므로 driver와 firmware가 동일한 순서를 사용해야 한다.
ACPI resource가 extcon driver를 거쳐 USB OTG 역할과 전원·data path를 제어한다.
ID 감지는 필수이고 Vbus와 data mux 제어는 firmware resource에 따라 선택적이다.
=====================================================
Intel INT3496 ACPI device extcon driver documentation
=====================================================
The Intel INT3496 ACPI device extcon driver is a driver for ACPI
devices with an acpi-id of INT3496, such as found for example on
Intel Baytrail and Cherrytrail tablets.
This ACPI device describes how the OS can read the id-pin of the devices'
USB-otg port, as well as how it optionally can enable Vbus output on the
otg port and how it can optionally control the muxing of the data pins
between an USB host and an USB peripheral controller.
The ACPI devices exposes this functionality by returning an array with up
to 3 gpio descriptors from its ACPI _CRS (Current Resource Settings) call:
_CRS GPIO index와 connection ID mapping
17-33Index 0은 ID pin을 읽는 input GPIO다. 이 descriptor는 항상 존재하고 유효해야 하며 GPIO connection ID `id`에 대응한다.
Index 1은 device에서 OTG port로 Vbus를 출력하게 하는 output GPIO다. 값 `1`을 쓰면 Vbus output이 활성화된다. 이 descriptor는 없거나 유효하지 않을 수 있으며 connection ID는 `vbus`다.
Index 2는 USB host controller와 USB peripheral controller 사이에서 data pin을 mux하는 output GPIO다. 값 `1`을 쓰면 data pin이 peripheral controller 쪽으로 전환되며 connection ID는 `mux`다.
원문의 첫 표를 index·방향·active 값·유효성으로 구조화했다.
원문의 두 번째 표가 정의한 consumer connection ID와 배열 index의 정확한 대응이다.
Driver는 index 1과 2를 필수 resource처럼 가정해서는 안 된다. 특히 Vbus descriptor는 원문이 명시적으로 absent 또는 invalid일 수 있다고 설명하므로, 획득 결과를 검사한 뒤 지원되는 기능만 활성화해야 한다.
======= =====================================================================
Index 0 The input gpio for the id-pin, this is always present and valid
Index 1 The output gpio for enabling Vbus output from the device to the otg
port, write 1 to enable the Vbus output (this gpio descriptor may
be absent or invalid)
Index 2 The output gpio for muxing of the data pins between the USB host and
the USB peripheral controller, write 1 to mux to the peripheral
controller
======= =====================================================================
There is a mapping between indices and GPIO connection IDs as follows
======= =======
id index 0
vbus index 1
mux index 2
======= =======
요약·해설
extcon-intel-int3496.rst:1-33INT3496 extcon driver는 Baytrail·Cherrytrail 계열 tablet의 USB OTG ID pin, 선택 Vbus 출력, 선택 data mux를 ACPI `_CRS` GPIO descriptor로 제어한다.
배열 index는 고정된 ABI다. Index 0은 필수 input `id`, index 1은 값 1로 Vbus를 켜는 선택 output `vbus`, index 2는 값 1로 peripheral controller를 선택하는 output `mux`다.
구현에서 가장 중요한 점은 index 1과 2의 선택성을 보존하고 descriptor 유효성을 확인하는 것이다. Firmware table과 driver의 connection ID가 어긋나면 OTG 전원이나 data path를 반대로 제어할 수 있다.
Firmware와 driver mapping을 검토할 때의 핵심 순서다.