devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property
@ 2017-01-20 21:56 Rafał Miłecki
  2017-01-20 21:56 ` [PATCH V2 2/2] usb: core: read USB ports from DT in the usbport LED trigger driver Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Rafał Miłecki @ 2017-01-20 21:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-leds-u79uwXL29TY76Z2rM5mHXA, Richard Purdie,
	Jacek Anaszewski, Pavel Machek, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Rob Herring, Mark Rutland, Rafał Miłecki

From: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>

Some LEDs can be related to particular devices described in DT. This
property allows specifying such relations. E.g. USB LED should usually
be used to indicate some USB port(s) state.

Signed-off-by: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
---
V2: Replace "usb-ports" with "led-triggers" property which is more generic and
    allows specifying other devices as well.

When bindings patch is related to some followup implementation, they usually go
through the same tree.

Greg: this patch is based on top of e64b8cc72bf9 ("DT: leds: Improve examples by
adding some context") from kernel/git/j.anaszewski/linux-leds.git . Is there any
way to solve this dependency issue? Or should this patch wait until 3.11 is
released?
---
 Documentation/devicetree/bindings/leds/common.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
index 24b656014089..17632a041196 100644
--- a/Documentation/devicetree/bindings/leds/common.txt
+++ b/Documentation/devicetree/bindings/leds/common.txt
@@ -49,6 +49,17 @@ Optional properties for child nodes:
 - panic-indicator : This property specifies that the LED should be used,
 		    if at all possible, as a panic indicator.
 
+- led-triggers : List of devices that should trigger this LED activity. Some
+		 LEDs can be related to a specific device and should somehow
+		 indicate its state. E.g. USB 2.0 LED may react to device(s) in
+		 a USB 2.0 port(s). Another common example is switch or router
+		 with multiple Ethernet ports each of them having its own LED
+		 assigned (assuming they are not hardwired).
+		 In such cases this property should contain phandle(s) of
+		 related device(s). In many cases LED can be related to more
+		 than one device (e.g. one USB LED vs. multiple USB ports) so a
+		 list of entries can be specified.
+
 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
@@ -69,6 +80,11 @@ gpio-leds {
 		linux,default-trigger = "heartbeat";
 		gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
 	};
+
+	usb {
+		gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+		led-triggers = <&ohci_port1>, <&ehci_port1>;
+	};
 };
 
 max77693-led {
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-02-07 22:57 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20 21:56 [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property Rafał Miłecki
2017-01-20 21:56 ` [PATCH V2 2/2] usb: core: read USB ports from DT in the usbport LED trigger driver Rafał Miłecki
2017-01-20 21:56 ` [EXAMPLE V2 3/2] ARM: BCM53573: Specify ports for USB LED for Tenda AC9 Rafał Miłecki
2017-01-20 22:35 ` [PATCH V2 1/2] dt-bindings: leds: document new led-triggers property Jacek Anaszewski
     [not found]   ` <29f27028-20f3-3eb9-502f-1b51958640f9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-21 16:24     ` Rafał Miłecki
     [not found]       ` <CACna6rx-qJ5eLMOUbMcaAxaOp9avrj1sa-8zZo2m+rVvY+Kvjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-21 21:42         ` Jacek Anaszewski
     [not found]           ` <46084d98-fddb-1b92-e9ca-d55957a442ae-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-25  9:03             ` Rafał Miłecki
     [not found]               ` <CACna6rx5HsSb=rXCjVth_2ed87tUSBJEZHHxTC_S1YOztLjp1A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-25 21:04                 ` Jacek Anaszewski
2017-01-31 16:11                   ` Rafał Miłecki
     [not found]                     ` <f9bda1d6-4265-8fe6-58ba-d6da5b462a0c-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
2017-01-31 21:34                       ` Jacek Anaszewski
2017-02-01  7:38                         ` Rafał Miłecki
     [not found]                         ` <c4f1d3c4-d972-e305-abb9-a5c6e9e184e9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-01 15:56                           ` Rafał Miłecki
     [not found]                             ` <d3535c2c-2a7c-4e8d-552c-666f76043b7d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-01 21:26                               ` Jacek Anaszewski
2017-02-01 21:55                                 ` Rafał Miłecki
2017-02-02 20:44                                   ` Jacek Anaszewski
2017-02-02 23:00                                     ` Rafał Miłecki
     [not found]                                       ` <aa97923a-d46c-ad90-a96a-0017129daeb8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-03 11:05                                         ` Pavel Machek
2017-02-07 21:41                                       ` Jacek Anaszewski
2017-02-07 22:57                                   ` Rob Herring
2017-01-23 16:45     ` Rob Herring
2017-01-23 20:51       ` Jacek Anaszewski
2017-01-25  9:18         ` Rafał Miłecki
     [not found]           ` <2aed99c3-7ebe-8b16-5d75-8d0d5b20c27e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-25 21:04             ` Jacek Anaszewski
2017-01-25  9:08       ` Rafał Miłecki
     [not found]         ` <d791bf97-d2f0-1f33-724a-9dd0c4f631ae-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-25 21:04           ` Jacek Anaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).