← Documents Documentation/devicetree/bindings/w1/w1.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / W1

Generic One-Wire Bus Bindings

One-Wire master·slave node 구조와 GPIO battery 예제를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

w1.txt:1-25

One-Wire master·slave node 구조와 GPIO battery 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, phandle, baud rate, example, source path와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Generic devicetree bindings for onewire (w1) busses
2 ===================================================
3
4 Onewire busses are described through nodes of their master bus controller.
5 Slave devices are listed as sub-nodes of such master devices. For now, only
6 one slave is allowed per bus master.
7
8
9 Example:
10
11 charger: charger {
12 compatible = "gpio-charger";
13 charger-type = "mains";
14 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
15 };
16
17 onewire {
18 compatible = "w1-gpio";
19 gpios = <&gpio 100 0>, <&gpio 101 0>;
20
21 battery {
22 compatible = "maxim,ds2760";
23 power-supplies = <&charger>;
24 };
25 };
26

3. 한국어 전문 번역

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

Generic One-Wire bus와 slave

1-8

일반 One-Wire(W1) bus는 master bus controller node로 기술하고 slave device는 master의 sub-node로 나열합니다. 현재는 bus master 하나당 slave 하나만 허용합니다.

GPIO charger와 DS2760 battery 예제

9-25

예제는 active-low GPIO를 쓰는 mains charger를 정의합니다. `w1-gpio` master는 data와 pull-up GPIO 두 개를 사용하고, child battery는 `maxim,ds2760` compatible과 charger phandle을 `power-supplies`로 참조합니다.

Example:

        charger: charger {
                compatible = "gpio-charger";
                charger-type = "mains";
                gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
        };

        onewire {
                compatible = "w1-gpio";
                gpios = <&gpio 100 0>, <&gpio 101 0>;

                battery {
                        compatible = "maxim,ds2760";
                        power-supplies = <&charger>;
                };
        };