Re: Maximum values for multi_intensity sysfs attribute

From: Werner Sembach

Date: Tue Mar 03 2026 - 15:36:42 EST



Am 03.03.26 um 21:11 schrieb Armin Wolf:
Am 14.02.26 um 20:15 schrieb Armin Wolf:

Hello,

i am currently adding support for RGB keyboard backlight control to the uniwill-laptop
driver, and want to use the multicolor LED class for that. However the hardware interface
is a bit exotic:

- 5 global brightness levels
- 50 intensity levels for each R/G/B channel

I am now asking myself how this should be mapped onto the multi_intensity sysfs attribute.
Should i set max_brightness to 5 and reject intensity values larger that 50? Or should
i set max_brightness to 50 and interpolate? What is the input range of intensity values?

Thanks,
Armin Wolf

Any ideas on this? My current approach would be to use 5 for the max brightness and clamp intensity
values to 50.
Another idea is to have multi_intensity values 0-255 and then map it to the closest color so normal rgb values can be passed

Thanks,
Armin Wolf