From: Werner Sembach <wse@tuxedocomputers.com>
To: "Pőcze Barnabás" <pobrn@protonmail.com>,
"Armin Wolf" <W_Armin@gmx.de>,
linux-leds@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Maximum values for multi_intensity sysfs attribute
Date: Wed, 4 Mar 2026 12:58:06 +0100 [thread overview]
Message-ID: <2f9918d2-b62b-41d7-9f80-8a3554764ade@tuxedocomputers.com> (raw)
In-Reply-To: <90a08353-429c-4603-bc6f-536a789fe5fa@protonmail.com>
Hi Barnabás,
Am 04.03.26 um 12:45 schrieb Pőcze Barnabás:
> Hi
>
> 2026. 02. 14. 20:15 keltezéssel, Armin Wolf írta:
>> 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?
> Is that the same interface implemented by https://github.com/pobrn/hid-ite8291r3
> (and https://github.com/pobrn/ite8291r3-ctl)?
>
> In any case it's probably not too different. Unfortunately I don't recall ever finding a
> satisfying way to integrate it with the multi-color led things. The best approach I could
> find: brightness as [0; 50], while multi_intesity is [0; 255], essentially specifying the
> color of each channel (simply clamping, without `led_mc_calc_color_components()`). Note that
> the above kernel driver does not implement per-key color setting, so this approach seemed
> most sensible.
Note that some devices control the brightness levels via EC directly when
pressing a key combo with no way of disabling that. So the 5 brightness levels
can't be easily abstracted away.
For best compatibility I would still suggest adapting the brightness levels of
the firmware (5 levels), it will cause headaches down the road otherwise.
Best regards,
Werner
>
>
> Barnabás Pőcze
>
>> Thanks,
>> Armin Wolf
>>
>>
>
prev parent reply other threads:[~2026-03-04 11:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-14 19:15 Maximum values for multi_intensity sysfs attribute Armin Wolf
2026-03-03 20:11 ` Armin Wolf
2026-03-03 20:35 ` Werner Sembach
2026-03-03 20:43 ` Werner Sembach
2026-03-04 11:45 ` Pőcze Barnabás
2026-03-04 11:58 ` Werner Sembach [this message]
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=2f9918d2-b62b-41d7-9f80-8a3554764ade@tuxedocomputers.com \
--to=wse@tuxedocomputers.com \
--cc=W_Armin@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pobrn@protonmail.com \
/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