← Documents Documentation/devicetree/bindings/w1/w1-gpio.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / W1

Bit-Banged GPIO 1-Wire Bus

GPIO 1-Wire bus의 data, pull-up enable과 open-drain 설정을 설명합니다.

Source pathDocumentation/devicetree/bindings/w1/w1-gpio.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

w1-gpio.yaml:1-43

GPIO 1-Wire bus의 data, pull-up enable과 open-drain 설정을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, phandle, baud rate, example, source path와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/w1/w1-gpio.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Bitbanged GPIO 1-Wire Bus
8
9 maintainers:
10 - Daniel Mack <zonque@gmail.com>
11
12 properties:
13 compatible:
14 const: w1-gpio
15
16 gpios:
17 minItems: 1
18 items:
19 - description: Data I/O pin
20 - description: Enable pin for an external pull-up resistor
21
22 linux,open-drain:
23 type: boolean
24 description: >
25 If specified, the data pin is considered in open-drain mode.
26
27 required:
28 - compatible
29 - gpios
30
31 additionalProperties:
32 type: object
33
34 examples:
35 - |
36 #include <dt-bindings/gpio/gpio.h>
37
38 onewire {
39 compatible = "w1-gpio";
40 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
41 };
42
43 ...
44

3. 한국어 전문 번역

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

Bit-banged GPIO 1-Wire bus

1-11

GPL-2.0으로 배포되는 이 스키마는 GPIO bit-banging으로 구현한 1-Wire bus를 정의합니다. 관리자는 Daniel Mack입니다.

Data pin, pull-up enable과 open-drain

12-33

`compatible`은 `w1-gpio`입니다. `gpios`의 첫 항목은 data I/O pin이고 선택적인 두 번째 항목은 외부 pull-up resistor enable pin입니다.

`linux,open-drain`을 지정하면 data pin을 open-drain mode로 취급합니다. compatible과 gpios가 필수이고 1-Wire slave child object를 허용합니다.

properties:
  compatible:
    const: w1-gpio

  gpios:
    minItems: 1
    items:
      - description: Data I/O pin
      - description: Enable pin for an external pull-up resistor

  linux,open-drain:
    type: boolean
    description: >
      If specified, the data pin is considered in open-drain mode.

required:
  - compatible
  - gpios

additionalProperties:
  type: object

Active-high GPIO bus 예제

34-43

예제 `onewire` node는 GPIO controller의 pin 0을 active-high data line으로 사용합니다.

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    onewire {
        compatible = "w1-gpio";
        gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
    };

...