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

Linux 6.18.37 · Devicetree Bindings / Trigger Source

Generic GPIO Trigger Source

GPIO를 argument 없는 generic trigger source로 사용하는 방법을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

gpio-trigger.yaml:1-40

GPIO를 argument 없는 generic trigger source로 사용하는 방법을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, register, GPIO, phandle, 수치와 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/trigger-source/gpio-trigger.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Generic trigger source using GPIO
8
9 description: A GPIO used as a trigger source.
10
11 maintainers:
12 - Jonathan Santos <Jonathan.Santos@analog.com>
13
14 properties:
15 compatible:
16 const: gpio-trigger
17
18 '#trigger-source-cells':
19 const: 0
20
21 gpios:
22 maxItems: 1
23 description: GPIO to be used as a trigger source.
24
25 required:
26 - compatible
27 - '#trigger-source-cells'
28 - gpios
29
30 additionalProperties: false
31
32 examples:
33 - |
34 #include <dt-bindings/gpio/gpio.h>
35
36 trigger {
37 compatible = "gpio-trigger";
38 #trigger-source-cells = <0>;
39 gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
40 };
41

3. 한국어 전문 번역

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

Generic GPIO trigger source

1-13

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 GPIO 하나를 trigger source로 사용하는 generic provider를 정의합니다. Maintainer는 Jonathan Santos입니다.

GPIO와 zero-cell specifier

14-31

`compatible`은 `gpio-trigger`입니다. `#trigger-source-cells`는 0이므로 consumer가 추가 argument를 전달하지 않습니다. `gpios`는 trigger source로 사용할 GPIO 한 개입니다. 세 속성이 모두 필수이며 추가 속성은 허용하지 않습니다.

properties:
  compatible:
    const: gpio-trigger

  '#trigger-source-cells':
    const: 0

  gpios:
    maxItems: 1
    description: GPIO to be used as a trigger source.

required:
  - compatible
  - '#trigger-source-cells'
  - gpios

additionalProperties: false

Active-high GPIO trigger

32-40

예제 `trigger` node는 GPIO controller `gpio1`의 line 15를 active-high trigger source로 지정합니다.

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

    trigger {
        compatible = "gpio-trigger";
        #trigger-source-cells = <0>;
        gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
    };