From: Rafał Miłecki <rafal@xxxxxxxxxx> Timer trigger is one of the simplest, hardware independent triggers. It just blinks LED with a given intervals. Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx> --- .../devicetree/bindings/leds/triggers-timer.txt | 18 ++++++++++++++++++ Documentation/devicetree/bindings/leds/triggers.txt | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/triggers-timer.txt diff --git a/Documentation/devicetree/bindings/leds/triggers-timer.txt b/Documentation/devicetree/bindings/leds/triggers-timer.txt new file mode 100644 index 000000000000..0e6c81d6f81b --- /dev/null +++ b/Documentation/devicetree/bindings/leds/triggers-timer.txt @@ -0,0 +1,18 @@ +Timer LED trigger properties. + +Timer trigger enables and disables LED with a given time intervals. It's example +usage may be a simple indication that system is alive & working (to some point +at least). + +Properties: +- trigger-type : Must be "timer". +- delay-on : Amount of time (in milliseconds) LED stays enabled. +- delay-off : Amount of time (in milliseconds) LED stays disabled. + +Examples: + +timer-trigger { + trigger-type = "timer"; + delay-on = <300>; + delay-off = <1000>; +}; diff --git a/Documentation/devicetree/bindings/leds/triggers.txt b/Documentation/devicetree/bindings/leds/triggers.txt index a1fbf3a75d67..8d8daa027bee 100644 --- a/Documentation/devicetree/bindings/leds/triggers.txt +++ b/Documentation/devicetree/bindings/leds/triggers.txt @@ -11,3 +11,20 @@ Common properties: documentation for more details. More properties can be available depending on the chosen trigger type. + +Examples: + +timer_trigger: timer-trigger { + trigger-type = "timer"; + ... +}; + +gpio-leds { + compatible = "gpio-leds"; + + system-status { + label = "Status"; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + triggers = <&timer_trigger>; + }; +}; -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html