diff mbox

[3/4] dt-bindings: leds: document binding for LED timer trigger

Message ID 20170228120452.10043-3-zajec5@gmail.com
State Superseded, archived
Headers show

Commit Message

Rafał Miłecki Feb. 28, 2017, 12:04 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

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@milecki.pl>
---
 .../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 mbox

Patch

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>;
+	};
+};