1# Copyright (c) 2018, Linaro Limited
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5  This allows you to define a group of LEDs. Each LED in the group is
6  controlled by a GPIO. Each LED is defined in a child node of the
7  gpio-leds node.
8
9  Here is an example which defines three LEDs in the node /leds:
10
11  / {
12  	leds {
13  		compatible = "gpio-leds";
14  		led_0 {
15  			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
16  		};
17  		led_1 {
18  			gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
19  		};
20  		led_2 {
21  			gpios = <&gpio1 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
22  		};
23  	};
24  };
25
26  Above:
27
28  - led_0 is pin 1 on gpio0. The LED is on when the pin is low,
29    and off when the pin is high.
30  - led_1 is pin 2 on gpio0. The LED is on when the pin is high,
31    and off when it is low.
32  - led_2 is pin 15 on gpio1. The LED is on when the pin is low,
33    and the pin's internal pull-up resistor should be enabled.
34
35compatible: "gpio-leds"
36
37child-binding:
38  description: GPIO LED child node
39  properties:
40    gpios:
41      type: phandle-array
42      required: true
43    label:
44      type: string
45      description: |
46        Human readable string describing the LED. It can be used by an
47        application to identify this LED or to retrieve its number/index
48        (i.e. child node number) on the parent device.
49