Re: [PATCH v3 1/2] dt-bindings: leds: Add multicolor PWM LED bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 1/31/22 08:10, Alexander Dahl wrote:
I know that color curves were being discussed at the time multicolor
was being introduced, and AFAIK Pavel didn't like it, but I don't
remember the reasons anymore.

As far as I understand it though, for PWM LEDs there is an equation for
gamma correction.

That's right, and it gets a little more complicated if you have RGB
instead of a single LED.  A start for reading might be this:

https://hackaday.com/2016/08/23/rgb-leds-how-to-master-gamma-and-hue-for-perfect-brightness/

(I had bookmarked that back when I was hacking on firmware for an 8bit
microcontroller controlling an RGB LED through soft PWM few years
ago.  A very simple solution is a precalculated static lookup table.)

This is a very interesting topic which I was gonna ask about on this list anyways. IMHO, the Linux leds subsystem needs a uniform way to deal with lightness/gamma correction. There is some previous work in pwm_bl and led_bl with their `brightness-levels` device tree property and cie1931 correction function (drivers/video/backlight/pwm_bl.c). It would be very nice to have this functionality in the led class. Having something similar for multi-color as well would be fantastic.

Sven



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux