Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: Let the binding document example for leds-gpio follow the gpio bindings

In the gpio bindings documents it is requested to use the marco's in
include/dt-bindings/gpio/gpio.h whenever possible. The gpios in the led
drivers don't seem to form an exception, so update the example in the
document bindings.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>

authored by

Olliver Schinagl and committed by
Bryan Wu
0cd1b0c3 0c571785

+7 -5
+7 -5
Documentation/devicetree/bindings/leds/leds-gpio.txt
··· 26 26 27 27 Examples: 28 28 29 + #include <dt-bindings/gpio/gpio.h> 30 + 29 31 leds { 30 32 compatible = "gpio-leds"; 31 33 hdd { 32 34 label = "IDE Activity"; 33 - gpios = <&mcu_pio 0 1>; /* Active low */ 35 + gpios = <&mcu_pio 0 GPIO_ACTIVE_LOW>; 34 36 linux,default-trigger = "ide-disk"; 35 37 }; 36 38 37 39 fault { 38 - gpios = <&mcu_pio 1 0>; 40 + gpios = <&mcu_pio 1 GPIO_ACTIVE_HIGH>; 39 41 /* Keep LED on if BIOS detected hardware fault */ 40 42 default-state = "keep"; 41 43 }; ··· 46 44 run-control { 47 45 compatible = "gpio-leds"; 48 46 red { 49 - gpios = <&mpc8572 6 0>; 47 + gpios = <&mpc8572 6 GPIO_ACTIVE_HIGH>; 50 48 default-state = "off"; 51 49 }; 52 50 green { 53 - gpios = <&mpc8572 7 0>; 51 + gpios = <&mpc8572 7 GPIO_ACTIVE_HIGH>; 54 52 default-state = "on"; 55 53 }; 56 54 }; ··· 59 57 compatible = "gpio-leds"; 60 58 61 59 charger-led { 62 - gpios = <&gpio1 2 0>; 60 + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; 63 61 linux,default-trigger = "max8903-charger-charging"; 64 62 retain-state-suspended; 65 63 };