All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] dt-bindings: leds: document property for LED triggers
@ 2017-02-28 12:04 Rafał Miłecki
  2017-02-28 12:04 ` [PATCH 2/4] leds: triggers: add early support for trigger-type DT property Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Rafał Miłecki @ 2017-02-28 12:04 UTC (permalink / raw)
  To: Richard Purdie, Jacek Anaszewski, linux-leds
  Cc: Rob Herring, Mark Rutland, devicetree, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

There was a long discussion on describing LED trigger sources in DT.
Few solutions were posted but neither was clear & flexible enough. It's
really hard to design DT bindings for a LED node that will allow
describing any kinds of triggers.

Finally Jacek suggested a different design. It involved using separated
DT node for each trigger.

This documentation follows that idea. It really simplifies DT bindings
and allows clear support for different trigger types. With this solution
every type can have its own specific properties.

Please note an example will be added later with the first supported
trigger bindings. The point is to have nodes like:
foo-trigger {
	trigger-type = "foo";
	...
};

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 Documentation/devicetree/bindings/leds/common.txt   |  3 +++
 Documentation/devicetree/bindings/leds/triggers.txt | 13 +++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/leds/triggers.txt

diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
index 696be5792625..0bc91556a47a 100644
--- a/Documentation/devicetree/bindings/leds/common.txt
+++ b/Documentation/devicetree/bindings/leds/common.txt
@@ -49,6 +49,9 @@ Optional properties for child nodes:
 - panic-indicator : This property specifies that the LED should be used,
 		    if at all possible, as a panic indicator.
 
+- triggers : List of nodes of triggers that should control this LED state. For
+	     more details see triggers.txt.
+
 Required properties for flash LED child nodes:
 - flash-max-microamp : Maximum flash LED supply current in microamperes.
 - flash-max-timeout-us : Maximum timeout in microseconds after which the flash
diff --git a/Documentation/devicetree/bindings/leds/triggers.txt b/Documentation/devicetree/bindings/leds/triggers.txt
new file mode 100644
index 000000000000..a1fbf3a75d67
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/triggers.txt
@@ -0,0 +1,13 @@
+Common trigger properties.
+
+Triggers describe the way LEDs should be controlled, e.g. under what conditions
+they should be turned on or off. Depending on a trigger type various events can
+be used to determine a LED state. Some triggers can be hardware independent
+(e.g. time based), some can react to a specific hardware events.
+
+Common properties:
+- trigger-type : Type of a trigger. Choosing a trigger determines what kind of
+		 events will be used to control LED. See specific trigger
+		 documentation for more details.
+
+More properties can be available depending on the chosen trigger type.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-03-12 11:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28 12:04 [PATCH 1/4] dt-bindings: leds: document property for LED triggers Rafał Miłecki
2017-02-28 12:04 ` [PATCH 2/4] leds: triggers: add early support for trigger-type DT property Rafał Miłecki
2017-02-28 12:04 ` [PATCH 3/4] dt-bindings: leds: document binding for LED timer trigger Rafał Miłecki
     [not found] ` <20170228120452.10043-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-28 12:04   ` [PATCH 4/4] leds: triggers: support timer trigger DT bindings Rafał Miłecki
2017-02-28 21:38   ` [PATCH 1/4] dt-bindings: leds: document property for LED triggers Jacek Anaszewski
2017-02-28 21:51     ` Rafał Miłecki
2017-02-28 22:12       ` Rob Herring
2017-03-01 21:04         ` Jacek Anaszewski
2017-03-01 22:55           ` Rob Herring
     [not found]           ` <386c5b7b-0bc0-d286-6cbb-745a5adbc1e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-06  6:06             ` Rafał Miłecki
2017-03-12 11:44               ` Rob Herring
     [not found]       ` <290ed068-2518-50ef-4d02-394bef8b7ee9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-01 21:04         ` Jacek Anaszewski
2017-03-06  6:16           ` Rafał Miłecki
2017-03-06 19:59             ` Jacek Anaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.