linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: "David Rivshin (Allworx)" <drivshin.allworx@gmail.com>,
	Dmitry Bondar <bond@simicon.com>,
	linux-leds@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH] Add LED driven by multiple gpio.
Date: Fri, 29 Apr 2016 14:58:16 +0200	[thread overview]
Message-ID: <20160429125816.GA30794@amd> (raw)
In-Reply-To: <572356BF.2040804@samsung.com>

Hi!

> >I'm hoping that if the RGB LED framework comes to fruition, that there
> >will be some way to combine arbitrary single-color LED devices into a
> >logical RGB LED.
> 
> It turns out that rgb-pattern trigger, we were discussing some time ago,
> would be useful also for LEDs of arbitrary colors. It should be given
> more generic name then, e.g. three-led-composite or so. The "color"
> sysfs attribute exposed by the trigger could be replaced with
> "subled_id", that would accept values 0, 1 or 2.
> 
> Brightness of such a compound LED could be set with:
> 
> led_trigger_3led_event(sturct led_trigger *trig,
>                        enum led_brightness led1,
>                        enum led_brightness led2,
>                        enum led_brightness led3)
> 
> Maybe we should think about making this scalable using
> C ellipsis feature:
> 
> led_trigger_3led_event(sturct led_trigger *trig,
>                        enum led_brightness led1,
>                        ...)

You don't need (and should not need) elipsis.

led_trigger_many_leds_event(sturct led_trigger *trig,
			      int num_leds,
                              enum led_brightness *brightness)

...should be fine.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2016-04-29 12:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25  8:14 [PATCH] Add LED driven by multiple gpio Dmitry Bondar
2016-04-25  9:23 ` Jacek Anaszewski
2016-04-27  6:56   ` Jacek Anaszewski
2016-04-26 20:26 ` David Rivshin (Allworx)
2016-04-29 12:42   ` Jacek Anaszewski
2016-04-29 12:58     ` Pavel Machek [this message]
2016-04-29 13:07       ` Jacek Anaszewski

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=20160429125816.GA30794@amd \
    --to=pavel@ucw.cz \
    --cc=bond@simicon.com \
    --cc=drivshin.allworx@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --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 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).