From: NeilBrown <neilb@suse.de>
To: Pavel Machek <pavel@ucw.cz>
Cc: Felipe Balbi <balbi@ti.com>,
cooloney@gmail.com, rpurdie@rpsys.net,
linux-leds@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: "advanced" LED controllers
Date: Thu, 26 Feb 2015 10:55:52 +1100 [thread overview]
Message-ID: <20150226105552.367fc141@notabene.brown> (raw)
In-Reply-To: <20150225214940.GA29527@amd>
[-- Attachment #1: Type: text/plain, Size: 3036 bytes --]
On Wed, 25 Feb 2015 22:49:41 +0100 Pavel Machek <pavel@ucw.cz> wrote:
> On Mon 2015-02-23 16:58:36, Felipe Balbi wrote:
> > On Mon, Feb 23, 2015 at 11:34:57PM +0100, Pavel Machek wrote:
> > > On Thu 2015-02-19 15:14:24, Felipe Balbi wrote:
> > > > Hi,
> > > >
> > > > Do we have support for LED controllers which can handle patterns of
> > > > different kinds ? I mean, currently, if we have an LED controller such
> > > > as TPIC2810 [1] which can control 8 different leds and each LED
> > > > corresponds to one bit on register 0x44, we could control leds by just
> > > > "playing" a wave file on the controller and create easy patterns with
> > > > that.
>
> > > > [1] http://www.ti.com/product/tpic2810
> > > >
> > > > ps: tpic2810 is probably the simplest example, lp551, lp5523 and others
> > > > have even more advanced pattern engines which can even handle RGB leds.
> > >
> > > Well... some more advanced pattern engines can actually run code, up
> > > to and including prime number computation. So yes, this is complex,
> > > and how to handle it nicely is a question...
> > >
> > > I have "notcc" to compile for that.
> >
> > right, the point is that this is a solution which only works with lp5523
> > and IMO linux led subsystem should do a little more for such devices.
>
> Well, question is what we want. Possibilities I see:
>
> 1) We won't support all the features, just some common subset. Kernel
> will get commands for LED controller and translate them. Question is
> what reasonable subset is, then.
>
> I guess "delay", "set led brightness to X", "jump" would be minimal
> shared command set. lp5523 can do also "slowly increase/decrease
> brightness to X" (I believe we should support that one), arithmetics,
> conditional jumps, and communications between 3 threads.
>
> 2) We want to support all the features. I guess that would mean doing
> compilation in userspace, and having "compiler" for each led
> controller. Having common source code would still be nice.
>
> Pavel
All (most) current options for controlling LEDs are based on what a user
might want, rather than what the hardware can provide.
I think it would be good to keep that approach, but add more "interesting"
functions which each hardware can support in whichever way suits it best.
So "ramp_blink" which allow a ramp on/off time to be specified would be
useful.
"audio_meter" which allows a particular sound card (or output or something)
to be specified would also be useful. You could also specify a what volume
the LED saturates.
Then if you set each led on a given controller to saturate at different level
and to use the same sound source, then you could get the "graphic equaliser"
effect.
Maybe 'blinking' should have a 'synchronise' setting to that a bunch of LEDs
can be synchonised so you can create a "cylon eye" effect.
i.e. don't focus on the low-level 'what can we provide' but on the high level
"what might users want".
NeilBrown
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2015-02-25 23:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 21:14 "advanced" LED controllers Felipe Balbi
2015-02-19 21:14 ` Felipe Balbi
2015-02-23 22:34 ` Pavel Machek
2015-02-23 22:58 ` Felipe Balbi
2015-02-23 22:58 ` Felipe Balbi
2015-02-25 21:49 ` Pavel Machek
2015-02-25 23:55 ` NeilBrown [this message]
2015-02-28 16:18 ` Pavel Machek
2015-02-25 8:25 ` Geert Uytterhoeven
2015-02-25 9:06 ` Alexandre Courbot
2015-03-02 9:21 ` Pavel Machek
2015-03-03 8:15 ` Alexandre Courbot
2015-03-08 20:57 ` RGB LED control (was Re: "advanced" LED controllers) Pavel Machek
2015-03-09 8:08 ` Geert Uytterhoeven
2015-03-09 9:08 ` Pavel Machek
2015-03-09 11:50 ` Måns Rullgård
2015-03-09 11:50 ` Måns Rullgård
2015-03-10 8:04 ` Pavel Machek
[not found] ` <CAK5ve-K4jyBSVk1CZ8qQrFgevqdbhdsgZ1ZYX2e-t07494oq4A@mail.gmail.com>
2015-03-11 9:34 ` Documentation: leds: clarify what 50% brightness means 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=20150226105552.367fc141@notabene.brown \
--to=neilb@suse.de \
--cc=balbi@ti.com \
--cc=cooloney@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.