linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Abanoub Sameh <abanoubsameh8@gmail.com>,
	"pavel@ucw.cz" <pavel@ucw.cz>,
	"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Abanoub Sameh <abanoubsameh@protonmail.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] leds: led-core: Get rid of enum led_brightness
Date: Fri, 11 Dec 2020 19:31:52 +0100	[thread overview]
Message-ID: <20201211193152.7a6e0fbb@nic.cz> (raw)
In-Reply-To: <2ae41868b2604a489927b5903529afb4@AcuMS.aculab.com>

On Fri, 11 Dec 2020 14:08:43 +0000
David Laight <David.Laight@ACULAB.COM> wrote:

> 
> More than 8 bits would be good.
> While not really relevant for actual 'brightness' it allows
> for 'strange' things be encoded in the brightness field.
>
> For instance we have some hardware that has RGB leds on it.
> They are a single device so it really needs a colour property.
> But it is more complex than that, between the driver and LED
> there is an FPGA - so it can modulate the LED output in many ways.
> As well as using PWM to change the brightness and (eg) 1/2HZ flashing
> it is possible to alternate between red and green to get a reasonable
> orange (works better than driving both at the same time!).

Please don't do that. Don't misuse brightness for other settings.
Instead try to implement the settings in other sysfs files, maybe even
make it generic. Document the new sysfs ABI. But to not encode
non-brightness properties into brightness.

For you multicolor example there is multicolor LED framework now in
kernel.

Marek

  reply	other threads:[~2020-12-11 20:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  1:48 [PATCH] leds: led-core: Get rid of enum led_brightness Abanoub Sameh
2020-12-11 12:56 ` Marek Behun
2020-12-11 14:08   ` David Laight
2020-12-11 18:31     ` Marek Behun [this message]
2020-12-17 22:59     ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2020-12-11 20:42 Abanoub Sameh
2021-02-19 10:36 ` Pavel Machek
2020-12-10 13:49 Abanoub Sameh
2020-12-10 20:03 ` kernel test robot

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=20201211193152.7a6e0fbb@nic.cz \
    --to=marek.behun@nic.cz \
    --cc=David.Laight@ACULAB.COM \
    --cc=abanoubsameh8@gmail.com \
    --cc=abanoubsameh@protonmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=lkp@intel.com \
    --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).