linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: robh@kernel.org
Cc: jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org,
	mark.rutland@arm.com, baolin.wang@linaro.org,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] dt-bindings: leds: Add pattern initialization from Device Tree
Date: Wed, 12 Dec 2018 09:42:30 +0100	[thread overview]
Message-ID: <CAJKOXPfrRKvvK0fq9SS5xOgeT-vS30z0JwFh=55bow4-tktSZQ@mail.gmail.com> (raw)
In-Reply-To: <CABGGiszi3cgkQy0+h4q6nEY0V1Td2x3eR_kZ50cu3awrSGscMQ@mail.gmail.com>

On Tue, 11 Dec 2018 at 18:23, Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Dec 10, 2018 at 3:30 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Document new linux,trigger-pattern property for initialization of LED
> > pattern trigger.
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/leds/common.txt | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/leds/common.txt b/Documentation/devicetree/bindings/leds/common.txt
> > index aa1399814a2a..4c65e854bb91 100644
> > --- a/Documentation/devicetree/bindings/leds/common.txt
> > +++ b/Documentation/devicetree/bindings/leds/common.txt
> > @@ -37,6 +37,13 @@ Optional properties for child nodes:
> >       "ide-disk" - LED indicates IDE disk activity (deprecated),
> >                    in new implementations use "disk-activity"
> >       "timer" - LED flashes at a fixed, configurable rate
> > +     "pattern" - LED alters the brightness for the specified duration with one
> > +                 software timer (see
> > +                 Documentation/ABI/testing/sysfs-class-led-trigger-pattern)
> > +
> > +- linux,trigger-pattern : Default pattern for "pattern" trigger (see
> > +                          Documentation/ABI/testing/sysfs-class-led-trigger-pattern
> > +                          for description of format)
>
> Binding documents should generally not refer to kernel docs and need
> to stand on their own.

I'll copy then the description of pattern.

> I don't think this needs to be linux specific. I'd just call it
> 'led-pattern'. I don't think this should be tied to the trigger types.
> Isn't possible you would want to tie a pattern to different triggers.
> IOW, when event X happens, run the pattern. And you could have
> one-shot versus continuous.

In general pattern has trigger specific format. For pattern-trigger it
would look like "0 1000 255 1000". For timer trigger it would be just
a single number (period for blinks). Quite similar for the oneshot
trigger. I can change it to "led-pattern" (or maybe
"led-default-pattern" to match "linux,default-trigger" property?) and
document that the pattern itself is trigger specific

Best regards,
Krzysztof

  reply	other threads:[~2018-12-12  8:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  9:29 [PATCH v2 0/5] leds: trigger: Add pattern initialization from Device Tree Krzysztof Kozlowski
2018-12-10  9:29 ` [PATCH v2 1/5] led: triggers: Break the for loop after default trigger is found Krzysztof Kozlowski
2018-12-10  9:29 ` [PATCH v2 2/5] led: triggers: Add LED_INIT_DEFAULT_TRIGGER flag Krzysztof Kozlowski
2018-12-10  9:29 ` [PATCH v2 3/5] led: triggers: Initialize LED_INIT_DEFAULT_TRIGGER if trigger is brought after class Krzysztof Kozlowski
2018-12-10  9:30 ` [PATCH v2 4/5] dt-bindings: leds: Add pattern initialization from Device Tree Krzysztof Kozlowski
2018-12-11 17:23   ` Rob Herring
2018-12-12  8:42     ` Krzysztof Kozlowski [this message]
2018-12-10  9:30 ` [PATCH v2 5/5] leds: trigger: " Krzysztof Kozlowski
2018-12-10 21:03 ` [PATCH v2 0/5] " Jacek Anaszewski
2018-12-12 12:16   ` Pavel Machek
2018-12-12 19:18     ` 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='CAJKOXPfrRKvvK0fq9SS5xOgeT-vS30z0JwFh=55bow4-tktSZQ@mail.gmail.com' \
    --to=krzk@kernel.org \
    --cc=baolin.wang@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pavel@ucw.cz \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.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).