lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Dec 2020 19:31:52 +0100
From:   Marek Behun <marek.behun@....cz>
To:     David Laight <David.Laight@...LAB.COM>
Cc:     Abanoub Sameh <abanoubsameh8@...il.com>,
        "pavel@....cz" <pavel@....cz>,
        "linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Abanoub Sameh <abanoubsameh@...tonmail.com>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] leds: led-core: Get rid of enum led_brightness

On Fri, 11 Dec 2020 14:08:43 +0000
David Laight <David.Laight@...LAB.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ