From: Jacek Anaszewski <jacek.anaszewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Rafał Miłecki" <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Richard Purdie"
<rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org>,
linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: "Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Rafał Miłecki" <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
Subject: Re: [PATCH 1/4] dt-bindings: leds: document property for LED triggers
Date: Tue, 28 Feb 2017 22:38:41 +0100 [thread overview]
Message-ID: <a6d25fb5-db5e-5643-b150-23588944674a@gmail.com> (raw)
In-Reply-To: <20170228120452.10043-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Hi Rafał,
Thanks for continuing this effort.
I think that it would be simpler if we could initially see
a complete sample dts implementation containing all required DT
nodes. The example could contain timer trigger as well as usb-port
trigger specific bindings.
I suppose that we should see DT nodes containing #list-cells
properties that define the quantity of phandle arguments.
It seems that this approach allows for defining a list of elements
with variable number of arguments, i.e. what you were initially
asking for.
Best regards,
Jacek Anaszewski
On 02/28/2017 01:04 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
>
> 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-g1n6cQUeyibVItvQsEIGlw@public.gmane.org>
> ---
> 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.
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-02-28 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jacek Anaszewski [this message]
2017-02-28 21:51 ` [PATCH 1/4] dt-bindings: leds: document property for LED triggers 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
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=a6d25fb5-db5e-5643-b150-23588944674a@gmail.com \
--to=jacek.anaszewski-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=rafal-g1n6cQUeyibVItvQsEIGlw@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rpurdie-Fm38FmjxZ/leoWH0uzbU5w@public.gmane.org \
--cc=zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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).