Part 1
요약·해설
공식 원문 89줄과 property 2행을 전수 대조해 required child GPIO·optional human-readable label·polarity and pull flags 제약을 보존했습니다.
gpio-leds
Generic or vendor-independent
2 rows
LED group + one GPIO specifier per child
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
6B4E95001A332043509FA2E39C0C9495C595C6CA6F682CCD0535ADAABBE811DE
:orphan:
.. raw:: html
<!--
FIXME: do not limit page width until content uses another representation
format other than tables
-->
<style>.wy-nav-content { max-width: none; !important }</style>
.. dtcompatible:: gpio-leds
.. _dtbinding_gpio_leds:
gpio-leds
#########
Vendor: :ref:`Generic or vendor-independent <dt_no_vendor>`
Description
***********
.. code-block:: none
This allows you to define a group of LEDs. Each LED in the group is
controlled by a GPIO. Each LED is defined in a child node of the
gpio-leds node.
Here is an example which defines three LEDs in the node /leds:
/ {
leds {
compatible = "gpio-leds";
led_0 {
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led_1 {
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
};
led_2 {
gpios = <&gpio1 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
};
Above:
- led_0 is pin 1 on gpio0. The LED is on when the pin is low,
and off when the pin is high.
- led_1 is pin 2 on gpio0. The LED is on when the pin is high,
and off when it is low.
- led_2 is pin 15 on gpio1. The LED is on when the pin is low,
and the pin's internal pull-up resistor should be enabled.
Properties
**********
Top level properties
====================
No top-level properties.
Child node properties
=====================
.. list-table::
:widths: 1 1 4
:header-rows: 1
* - Name
- Type
- Details
* - ``gpios``
- ``phandle-array``
- This property is **required**.
* - ``label``
- ``string``
- .. code-block:: none
Human readable string describing the LED. It can be used by an
application to identify this LED or to retrieve its number/index
(i.e. child node number) on the parent device.
See :ref:`dt-important-props` for more information.
Part 3
한국어 전문 번역
gpio-leds
Vendor: Generic or vendor-independent
공식 설명
This allows you to define a group of LEDs. Each LED in the group is
controlled by a GPIO. Each LED is defined in a child node of the
gpio-leds node.
Here is an example which defines three LEDs in the node /leds:
/ {
leds {
compatible = "gpio-leds";
led_0 {
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
led_1 {
gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
};
led_2 {
gpios = <&gpio1 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
};
Above:
- led_0 is pin 1 on gpio0. The LED is on when the pin is low,
and off when the pin is high.
- led_1 is pin 2 on gpio0. The LED is on when the pin is high,
and off when it is low.
- led_2 is pin 15 on gpio1. The LED is on when the pin is low,
and the pin's internal pull-up resistor should be enabled.GPIO LED group
각 LED는 gpio-leds node 아래 child로 정의합니다. Child의 gpios는 필수이고 label은 선택입니다.
gpios에는 controller, pin, flags가 들어갑니다. GPIO_ACTIVE_LOW이면 pin이 low일 때 켜지고, GPIO_ACTIVE_HIGH이면 high일 때 켜집니다. Pull-up 같은 GPIO flag도 함께 지정할 수 있습니다.
Top-level property와 base table을 이 child-only page에 추가하지 않았습니다.
속성 전체 번역
공식 page는 top-level/base property 없이 child property 2개만 정의합니다.
하위 노드 속성 · 2개
각 하위 노드에 적용되는 속성입니다.
| 이름 | 형식 | 설명과 제약 |
|---|---|---|
gpios | phandle-array | LED를 제어할 GPIO controller·pin·flag specifier입니다. 필수 |
label | string | 사람이 장치를 알아볼 수 있도록 붙이는 이름입니다. 과거에는 device_get_binding()의 인자로 사용했습니다. |
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.