LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Alexandre Courbot <gnurou@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Felipe Balbi <balbi@ti.com>, Bryan Wu <cooloney@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: "advanced" LED controllers
Date: Wed, 25 Feb 2015 18:06:07 +0900	[thread overview]
Message-ID: <CAAVeFuJ7DCs_=iESJRcXwyQ09eD57dZCxGG5CD3LD9_ZGZHP2A@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdUUNzFYHzSR3yLCJuz11vuO3Z4yVWVxRQfutGY1KxZLPQ@mail.gmail.com>

On Wed, Feb 25, 2015 at 5:25 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> CC linux-gpio, as this looks like the LED equivalent of bulk gpio?

Indeed. The LED core could implement something similar to
gpiod_set_array() to allow several LEDs to be set in one call. If the
controller supports it, it would then set all the LEDs at once,
otherwise the core would apply the values serially.

In leds-gpio.c, this multiple LED setting could be implemented by a
single call to gpiod_set_array() and the right thing would happen.

>
> On Thu, Feb 19, 2015 at 10:14 PM, Felipe Balbi <balbi@ti.com> wrote:
>> 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.
>>
>> AFAICT, in linux today we would have to register each of the 8 LEDs as a
>> different LED and have driver magic to write the proper bits on register
>> 0x44, that seems a bit overkill, specially when we want to make
>> patterns: instead of writing 0xff we would have to write 0x80, 0x40,
>> 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 separately and have the driver cache
>> the previous results so we don't end up switching off other LEDs.
>>
>> IOW, what could be handled with a single write, currently needs 8.
>>
>> I wonder if there's any work happening to support these slightly more
>> inteligent LED engines.
>>
>> regards
>>
>> [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.
>>
>> Currently the driver loads patterns as if it was a firmware blob and
>> registers each of R, G and B components as separate LEDs. Each component
>> also has its own brightness controls (something tpic2810 doesn't have,
>> it's either on or off).
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-02-25  9:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 21:14 Felipe Balbi
2015-02-23 22:34 ` Pavel Machek
2015-02-23 22:58   ` Felipe Balbi
2015-02-25 21:49     ` Pavel Machek
2015-02-25 23:55       ` NeilBrown
2015-02-28 16:18         ` Pavel Machek
2015-02-25  8:25 ` Geert Uytterhoeven
2015-02-25  9:06   ` Alexandre Courbot [this message]
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-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='CAAVeFuJ7DCs_=iESJRcXwyQ09eD57dZCxGG5CD3LD9_ZGZHP2A@mail.gmail.com' \
    --to=gnurou@gmail.com \
    --cc=balbi@ti.com \
    --cc=cooloney@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --subject='Re: "advanced" LED controllers' \
    /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

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).