linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>,
	Heiner Kallweit <hkallweit1@gmail.com>, Greg KH <greg@kroah.com>,
	linux-leds@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	pali.rohar@gmail.com, sre@kernel.org, khilman@kernel.org,
	aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com,
	Patrik Bachan <patrikbachan@gmail.com>,
	serge@hallyn.com
Subject: Re: [PATCH v5 1/4] leds: core: add generic support for RGB Color LED's
Date: Tue, 5 Apr 2016 11:01:41 +0200	[thread overview]
Message-ID: <20160405090141.GA23282@amd> (raw)
In-Reply-To: <5702DDD2.2030902@gmail.com>

Hi!

> >>>>It would have the same downsides as in case of having r, g and b in
> >>>>separate attributes, i.e. - problems with setting LED colour in
> >>>>a consistent way. This way LED blinking in whatever colour couldn't
> >>>>be supported reliably. It was one of your primary rationale standing
> >>>>behind this design, if I remember correctly. Second - what about
> >>>>triggers? We've had a long discussion about it and this design turned
> >>>>out to be most fitting.
> >>>
> >>>Are on/off triggers really that useful for a LED that can produce 16
> >>>million colors?
> >>>
> >>>I believe we should support patterns for RGB LEDs. Something like
> >>>[ (time, r, g, b), ... ] . Ok, what about this one?
> >>>
> >>>Lets say we have
> >>>
> >>>/sys/class/pattern/lp5533::0
> >>>/sys/class/pattern/software::0
> >>>
> >>>/sys/class/led/n900::red ; default trigger "lp5533::0:0"
> >>>/sys/class/led/n900::green ; default trigger "lp5533::0:1"
> >>>/sys/class/led/n900::blue ; default trigger "lp5533::0:2"
> >>>
> >>>Normally, pattern would correspond to one RGB LED. We could have
> >>>attribute "/sys/class/pattern/lp5533::0/color" containing R,G,B for
> >>>this pattern.
> 
> Could you give an example on how to set a color for RGB LED using
> this interface? Would it be compatible with LED triggers?
> Where the "pattern" class would be implemented?

Well, 'echo "50 60 70" > /sys/class/pattern/lp5533::0/color' should
set the color for the led. 'echo "trigger-name" > trigger' would set
the trigger, probably just toggling between LED off and set color for
the old triggers.

Where to implement the patterns is different question, but for example
drivers/leds/pattern?

Best regards,
									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-05  9:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 21:26 [PATCH v5 1/4] leds: core: add generic support for RGB Color LED's Heiner Kallweit
2016-03-04  9:04 ` Jacek Anaszewski
2016-03-29 10:02 ` Pavel Machek
2016-03-29 20:38   ` Heiner Kallweit
2016-03-29 21:43     ` Pavel Machek
2016-03-29 22:03       ` Pavel Machek
2016-03-30  5:58       ` Heiner Kallweit
2016-04-01 12:52         ` Pavel Machek
2016-03-30  8:07       ` Jacek Anaszewski
2016-03-30 13:03         ` Pavel Machek
2016-03-30 13:59           ` Heiner Kallweit
2016-03-31  8:17             ` Jacek Anaszewski
2016-04-01 12:55             ` Pavel Machek
2016-04-01 13:28               ` Jacek Anaszewski
2016-04-01 14:07                 ` Pavel Machek
2016-04-01 14:27                   ` Jacek Anaszewski
2016-04-01 15:03                     ` Pavel Machek
2016-04-01 12:53         ` Pavel Machek
2016-03-30  7:57     ` Jacek Anaszewski
2016-04-01 13:57       ` Pavel Machek
2016-04-01 18:56         ` Jacek Anaszewski
2016-04-01 21:18           ` Pavel Machek
2016-04-04 21:34             ` Jacek Anaszewski
2016-04-05  9:01               ` Pavel Machek [this message]
2016-04-05 19:45                 ` Jacek Anaszewski
2016-04-05 20:43                   ` Heiner Kallweit
2016-04-05 22:15                     ` Jacek Anaszewski
2016-04-06  9:16                       ` Pavel Machek
2016-04-06  9:12                     ` Pavel Machek
2016-04-06  8:52                   ` Pavel Machek
2016-04-06  9:53                     ` Jacek Anaszewski
2016-04-07 20:45                       ` Pavel Machek
2016-04-08 18:47                         ` Jacek Anaszewski
2016-04-09 16:01                           ` Pavel Machek
2016-04-12  7:13                             ` Jacek Anaszewski
2016-04-15 11:53                               ` Pavel Machek
2016-04-18  9:12                                 ` 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=20160405090141.GA23282@amd \
    --to=pavel@ucw.cz \
    --cc=aaro.koskinen@iki.fi \
    --cc=benjamin.tissoires@redhat.com \
    --cc=greg@kroah.com \
    --cc=hkallweit1@gmail.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=patrikbachan@gmail.com \
    --cc=serge@hallyn.com \
    --cc=sre@kernel.org \
    /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).