>From 359cf82ccd8ca100b4330596843af17fbaa85a9e Mon Sep 17 00:00:00 2001 From: Dmitry Bondar Date: Fri, 22 Apr 2016 17:46:33 +0300 Subject: [PATCH 1/2] Add LED driven by multiple gpio led(mgpio-led) description to device tree --- .../devicetree/bindings/leds/leds-mgpio.txt | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/leds-mgpio.txt diff --git a/Documentation/devicetree/bindings/leds/leds-mgpio.txt b/Documentation/devicetree/bindings/leds/leds-mgpio.txt new file mode 100644 index 0000000..135d810 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/leds-mgpio.txt @@ -0,0 +1,31 @@ +LED connected to multiple GPIO lines +For example red/green/orange led with to 2 gpio connectd to it. + +Required properties: +- compatible : should be "mgpio-led". +- gpios : Should specify the LED's GPIOs, see "gpios property" in + Documentation/devicetree/bindings/gpio/gpio.txt. Active low LEDs should be + indicated using flags in the GPIO specifier. +- color_names: list of colors +- color_vals: list of gpio values for each color + in example below for red led gpio 23 must be 0 and gpio 8 must be 1 + +Optional properties: +- label : + see Documentation/devicetree/bindings/leds/common.txt +- linux,default-trigger : + see Documentation/devicetree/bindings/leds/common.txt +- default-color + string from color-names +Examples: + +led_uplink{ + compatible = "simicon,mgpio-led"; + label = "uplink"; + gpios = <&portb 23 GPIO_ACTIVE_HIGH>, <&portb 8 GPIO_ACTIVE_HIGH>; + color_vals = <1 1>, <0 1>, <1 0>; + color_names = "orange", "red", "green"; + default-color = "green"; + linux,default-trigger = "heartbeat"; +}; + -- 1.7.10.4