linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Costa <me@paulo.costa.nom.br>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Subject: Re: [RFC] ledtrig-dither: A Poor man's adjustable LED brightness.
Date: Wed, 16 Aug 2017 00:55:04 -0300	[thread overview]
Message-ID: <CADbEYbk5US=SDpwPV8SLNsZMwrYgktPcXRp8RjYpm9+6iC8HAA@mail.gmail.com> (raw)
In-Reply-To: <20170815223413.GA8886@amd>

> Hmm. Can we simply use blinking trigger to do that?

To some extent...

If you just want to have 50% brightness, set timeon=1, timeoff=1 and
you are done.

But, accurately seting the brightness to weird numbers is harder.
E.g., To get 37% brightness your only chance is to set timeon=37,
timeoff=63 (Or multiples of it).

The larger delay causes very visible flickering, which sucks.



This trigger uses error propagation to continously adjusts the delay,
getting a higher blink frequency and accurate average brightness.

E.g., For 37% it will alternate between 33% (timeon=1,timeoff=2) and
50% (timeon=1,timeoff=1)



Unfortunately, it doesn't really help when the brightness is near 0%
or near 100%.
E.g., for 1% brightness, this trigger it is equivalent to
timeon=1,timeoff=99 -- Flickering is very visible.

  reply	other threads:[~2017-08-16  3:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 21:35 [RFC] ledtrig-dither: A Poor man's adjustable LED brightness Paulo Costa
2017-08-15 22:34 ` Pavel Machek
2017-08-16  3:55   ` Paulo Costa [this message]
2017-08-16 22:30     ` Pavel Machek
2017-08-17  4:21       ` Paulo Costa
2017-08-28  9:10         ` 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='CADbEYbk5US=SDpwPV8SLNsZMwrYgktPcXRp8RjYpm9+6iC8HAA@mail.gmail.com' \
    --to=me@paulo.costa.nom.br \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).