From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: bjorn.andersson@linaro.org, Baolin Wang <baolin.wang@linaro.org>,
rteysseyre@gmail.com, broonie@kernel.org,
linus.walleij@linaro.org, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/2] leds: core: Introduce LED pattern trigger
Date: Fri, 7 Sep 2018 09:34:27 +0200 [thread overview]
Message-ID: <20180907073427.GA21515@amd> (raw)
In-Reply-To: <e6cf7c2d-917a-b05f-178c-012c6b4161cf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
Hi!
> +What: /sys/class/leds/<led>/hw_pattern
> +Date: September 2018
> +KernelVersion: 4.20
> +Description:
> + Specify a hardware pattern for the SC27XX LED. For the SC27XX
> + LED controller, it only supports 4 hardware patterns to configure
> + the low time, rise time, high time and fall time for the breathing
> + mode, and each stage duration unit is 125ms. So the format of
> + the hardware pattern values should be:
> + "brightness_1 duration_1 brightness_2 duration_2 brightness_3
> + duration_3 brightness_4 duration_4".
>
> In this case low time and high time can be easily described with
> use of the proposed [brightness delta_t] tuples. It is not equally
> obvious in case of rise time and fall time.
>
> I can imagine hw pattern that would require defining blink rate
> over period of time, or blink rate during rise/fall time - in the
> latter case we would have odd number of pattern components. Probably
> it wouldn't be a big deal, we'd need one "padding" value, but still
> there's room for improvement IMHO.
Well, you can describe blinking while rising, it is just going to be
awkward as you'll need to give precise times/brightnesses for each
blinking, and pattern will become long.
I'm sure some hardware can do that (the led in N900 can compute prime
numbers, it can blink while changing brightness, too).
OTOH people tend to use pretty simple patterns on their LEDs, so we
should be fine.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-09-07 7:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 7:52 [PATCH v7 1/2] leds: core: Introduce LED pattern trigger Baolin Wang
2018-08-31 7:52 ` [PATCH v7 2/2] leds: sc27xx: Add pattern_set/clear interfaces for LED controller Baolin Wang
2018-09-03 18:58 ` [PATCH v7 1/2] leds: core: Introduce LED pattern trigger Jacek Anaszewski
2018-09-03 21:53 ` Pavel Machek
2018-09-04 2:05 ` Baolin Wang
2018-09-04 19:38 ` Jacek Anaszewski
2018-09-07 7:34 ` Pavel Machek [this message]
2018-09-04 1:32 ` Baolin Wang
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=20180907073427.GA21515@amd \
--to=pavel@ucw.cz \
--cc=baolin.wang@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rteysseyre@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).