linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Baolin Wang <baolin.wang@linaro.org>,
	rteysseyre@gmail.com, bjorn.andersson@linaro.org,
	broonie@kernel.org, linux-leds@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v14 1/2] leds: core: Introduce LED pattern trigger
Date: Wed, 10 Oct 2018 18:00:48 +0200	[thread overview]
Message-ID: <20181010160041.GA22121@amd> (raw)
In-Reply-To: <9bf6236e-83af-7156-b26b-7d88ece2d81e@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

Hi!

[Oops. I wrote this but forgot to send it? Anyway.. I guess it is
redundant now.]

> > +++ b/Documentation/ABI/testing/sysfs-class-led-trigger-pattern
> > @@ -0,0 +1,76 @@
> > +What:		/sys/class/leds/<led>/pattern
> > +Date:		September 2018
> > +KernelVersion:	4.20
> > +Description:
> > +		Specify a software pattern for the LED, that supports altering
> > +		the brightness for the specified duration with one software
> > +		timer. It can do gradual dimming and constant brightness.
> > +
> > +		The pattern is given by a series of tuples, of brightness and
> > +		duration (ms). The LED is expected to traverse the series and
> > +		each brightness value for the specified duration. Duration of
> > +		0 means brightness should immediately change to new value.
> > +
> > +		1. When doing gradual dimming, the led brightness will be updated
> > +		every 50 milliseconds, so the duration of each step should not
> > +		less than 50 milliseconds.
> 
> I'd like to avoid this constraint. Lowest supported delta_t should be 1.
> 
> We should only prevent entering dimming mode if current delta_t
> is lower than UPDATE_INTERVAL.

I agree that documenting it like this is strange. I don't think this
should be part of ABI as we may want to adjust it in the future.

> I also propose to make the dimming interval configurable via sysfs
> dimming_interval file.

I believe we should provide "right" dimming_interval. 50msec sounds
good. If we find it is too low / too high, we might want to adjust it.

If we find out that different users need different values, I guess we
can still add "dimming_interval" knob, but I'd suggest waiting until
such need arises.

[Now, I don't have strong feelings here, and patch would probably be
okay with me even if it has dimming_interval, but I'd prefer to keep
it simple. We are at v14 of the patch...]

Thanks,
									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 --]

  parent reply	other threads:[~2018-10-10 16:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 15:43 [PATCH v14 1/2] leds: core: Introduce LED pattern trigger Baolin Wang
2018-10-02 15:43 ` [PATCH v14 2/2] leds: sc27xx: Add pattern_set/clear interfaces for LED controller Baolin Wang
2018-10-02 20:25 ` [PATCH v14 1/2] leds: core: Introduce LED pattern trigger Jacek Anaszewski
2018-10-03  1:21   ` Baolin Wang
2018-10-04 20:00     ` Jacek Anaszewski
2018-10-09 12:01       ` Baolin Wang
2018-10-09 18:37         ` Jacek Anaszewski
2018-10-10  2:14           ` Baolin Wang
2018-10-10 16:00   ` Pavel Machek [this message]
2018-10-11  2:05     ` Baolin Wang
2018-10-10 20:43 ` Jacek Anaszewski
2018-10-11  3:06   ` Baolin Wang
2018-11-06 15:57 ` Geert Uytterhoeven
2018-11-07  3:23   ` Baolin Wang
2018-11-09  8:13     ` Pavel Machek

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=20181010160041.GA22121@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=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).