← Documents Documentation/devicetree/bindings/gpio/gpio-adnp.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Avionic Design N-bit GPIO Expander

ADNP I2C GPIO와 optional interrupt controller 바인딩입니다.

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

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

1. 요약·해설

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

요약과 해설

gpio-adnp.txt:1-33

GPIO polarity cell과 64-pin controller 예제를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Avionic Design N-bit GPIO expander bindings
2
3 Required properties:
4 - compatible: should be "ad,gpio-adnp"
5 - reg: The I2C slave address for this device.
6 - interrupts: Interrupt specifier for the controllers interrupt.
7 - #gpio-cells: Should be 2. The first cell is the GPIO number and the
8 second cell is used to specify optional parameters:
9 - bit 0: polarity (0: normal, 1: inverted)
10 - gpio-controller: Marks the device as a GPIO controller
11 - nr-gpios: The number of pins supported by the controller.
12
13 The GPIO expander can optionally be used as an interrupt controller, in
14 which case it uses the default two cell specifier as described in
15 Documentation/devicetree/bindings/interrupt-controller/interrupts.txt.
16
17 Example:
18
19 gpioext: gpio-controller@41 {
20 compatible = "ad,gpio-adnp";
21 reg = <0x41>;
22
23 interrupt-parent = <&gpio>;
24 interrupts = <160 1>;
25
26 gpio-controller;
27 #gpio-cells = <2>;
28
29 interrupt-controller;
30 #interrupt-cells = <2>;
31
32 nr-gpios = <64>;
33 };
34

3. 한국어 전문 번역

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

Avionic Design N-bit GPIO expander

1-16

Avionic Design N-bit GPIO expander의 필수 `compatible`은 `ad,gpio-adnp`이고, `reg`는 device의 I2C slave address입니다. `interrupts`는 controller interrupt specifier입니다.

`#gpio-cells`는 2입니다. 첫 번째 cell은 GPIO number, 두 번째 cell은 선택 parameter입니다. 두 번째 cell의 bit 0은 polarity로, 0은 normal이고 1은 inverted입니다. `gpio-controller`는 device를 GPIO controller로 표시하고 `nr-gpios`는 controller가 지원하는 pin 수입니다.

GPIO expander는 선택적으로 interrupt controller로도 사용할 수 있습니다. 이때 `Documentation/devicetree/bindings/interrupt-controller/interrupts.txt`에서 설명하는 기본 2-cell interrupt specifier를 사용합니다.

ADNP GPIO specifier
Cell/role의미
GPIO cell 0GPIO numberController 기준 pin index
GPIO cell 1 bit 00 / 1Normal / inverted polarity
Interrupt cells2기본 interrupt specifier
nr-gpiosController별지원 pin 수

2-cell GPIO specifier와 optional interrupt-controller 역할을 정리합니다.

ADNP 64-pin 예제

17-33

예제는 I2C address `0x41`의 64-pin GPIO controller를 선언합니다. Parent GPIO interrupt `<160 1>`을 받고 2-cell GPIO controller와 2-cell interrupt controller를 동시에 제공합니다.

gpioext: gpio-controller@41 {
        compatible = "ad,gpio-adnp";
        reg = <0x41>;

        interrupt-parent = <&gpio>;
        interrupts = <160 1>;

        gpio-controller;
        #gpio-cells = <2>;

        interrupt-controller;
        #interrupt-cells = <2>;

        nr-gpios = <64>;
};