From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-leds@vger.kernel.org,
"Richard Purdie" <rpurdie@rpsys.net>,
"Pavel Machek" <pavel@ucw.cz>,
devicetree@vger.kernel.org, "Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Russell King" <linux@armlinux.org.uk>,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH V3 1/2] dt-bindings: leds: document new trigger-sources property
Date: Mon, 29 May 2017 21:52:20 +0200 [thread overview]
Message-ID: <c12584bf-f0ab-337e-a8e8-e66e88026735@gmail.com> (raw)
In-Reply-To: <20170529140142.13496-2-zajec5@gmail.com>
Hi Rafał,
On 05/29/2017 04:01 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> Some LEDs can be related to a specific device(s) described in the DT.
> This property allows specifying such relations. E.g. USB LED should
> usually be used to indicate some USB port(s) state.
>
> Please note this binding is designed to be generic and not influenced by
> any operating system design. Linux developers may find "trigger" part a
> bit confusing since in Linux triggers are separated drivers. It
> shouldn't define the binding though (we shouldn't add an extra level of
> indirection).
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Replace "usb-ports" with "led-triggers" property which is more generic and
> allows specifying other devices as well.
> V3: Use "trigger-sources" which is even more accurate as devices aren't
> precisely triggers.
> ---
> Documentation/devicetree/bindings/leds/common.txt | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
> index 24b656014089..e6e300975a4c 100644
> --- a/Documentation/devicetree/bindings/leds/common.txt
> +++ b/Documentation/devicetree/bindings/leds/common.txt
> @@ -49,6 +49,19 @@ Optional properties for child nodes:
> - panic-indicator : This property specifies that the LED should be used,
> if at all possible, as a panic indicator.
>
> +- trigger-sources : List of devices which should be used as a source triggering
> + 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 source
> + 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
> + sources 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 +82,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>;
Didn't you mean "trigger-sources" here instead?
> + };
> };
>
> max77693-led {
>
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2017-05-29 19:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 14:01 [PATCH V3 0/2] usb: introduce "trigger-sources" DT property for usbport trigger Rafał Miłecki
[not found] ` <20170529140142.13496-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-29 14:01 ` [PATCH V3 1/2] dt-bindings: leds: document new trigger-sources property Rafał Miłecki
2017-05-29 19:52 ` Jacek Anaszewski [this message]
2017-05-29 20:12 ` Rafał Miłecki
[not found] ` <20170529140142.13496-2-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-30 9:27 ` [PATCH V4 0/2] usb: introduce "trigger-sources" DT property for usbport trigger Rafał Miłecki
[not found] ` <20170530092706.927-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-30 9:27 ` [PATCH V4 1/2] dt-bindings: leds: document new trigger-sources property Rafał Miłecki
[not found] ` <20170530092706.927-2-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-07 21:00 ` Rob Herring
2017-05-30 9:27 ` [PATCH V4 2/2] usb: core: read USB ports from DT in the usbport LED trigger driver Rafał Miłecki
2017-05-30 9:27 ` [EXAMPLE V4 3/2] ARM: BCM53573: Specify ports for USB LED for Tenda AC9 Rafał Miłecki
2017-06-08 16:08 ` [PATCH V5 0/2] usb: introduce "trigger-sources" DT property for usbport trigger Rafał Miłecki
2017-06-08 16:08 ` [PATCH V5 1/2] dt-bindings: leds: document new trigger-sources property Rafał Miłecki
[not found] ` <20170608160833.1567-2-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-14 15:23 ` Rob Herring
2017-06-08 16:08 ` [PATCH V5 2/2] usb: core: read USB ports from DT in the usbport LED trigger driver Rafał Miłecki
[not found] ` <20170608160833.1567-3-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-27 7:15 ` Rafał Miłecki
2017-06-08 16:08 ` [EXAMPLE V5 3/2] ARM: BCM53573: Specify ports for USB LED for Tenda AC9 Rafał Miłecki
2017-05-29 14:01 ` [PATCH V3 2/2] usb: core: read USB ports from DT in the usbport LED trigger driver Rafał Miłecki
2017-05-29 14:01 ` [EXAMPLE V3 3/2] ARM: BCM53573: Specify ports for USB LED for Tenda AC9 Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c12584bf-f0ab-337e-a8e8-e66e88026735@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=rpurdie@rpsys.net \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).