From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-244121.protonmail.ch (mail-244121.protonmail.ch [109.224.244.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F6FC370D57 for ; Wed, 4 Mar 2026 11:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=109.224.244.121 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772624740; cv=none; b=pQJb6EY0rxWd4IwEFK5ON/7kQsrRkYwYbp8GT0GTYZYE1WTHi30+sJdigmO710doGGFDv4W/TS/3Jhb58wVvO7VLb34cRTmvxOf1GKEN1tKwMdG2GORBKkETGvvoWbFdL9AOmC4g6PEaRX4IPV95OiZAEA3mU67tA1SjmRgr+Mo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772624740; c=relaxed/simple; bh=NSSfxOufCyzLSeUyF7KE2ClTykYKbq6mmIs0z1x3ijk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lopIlqwIYR1BNqHqLU5ZQg69L8g7UT9fGIqafacjzwayuuMgCHXDmq83WIPcF6NPfqSeuRAq3dEKkrywaaJRObIAB0EWKeqdB935h6i1s2miNvqATxw9rv9wQ1ndO+HKpFotIoMkDvzV5RDZr7Usv3mTQXlSs6phJDvQAShIBNA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=vIQgyIgj; arc=none smtp.client-ip=109.224.244.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="vIQgyIgj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1772624730; x=1772883930; bh=NSSfxOufCyzLSeUyF7KE2ClTykYKbq6mmIs0z1x3ijk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vIQgyIgj4MdWqpOB6ZK3FcKDcQeCFkdpMrlTgrzvKLF8OWMUSSLuFaBJMpBuDxI2l 5LQ4BWcCiIraWk7UFqJh8HbOSunpCKKWnmDr7Ql3oaxuWhED6gHlZuLNn/JjVoq6za yhCCYEtTObS7jIw+JyCDkwjzXxglgmWsddvfIPclGWqCGvdFZSpF6I7vbuvG7BS2Xm f25K0GjCRZIgS1LgyL5UULYJu06SYwcveS6bjdzl6tkRmpHg5p3qr/+IGBWfR1F9mA DTod9PwtzWSB+lDr1kClFiC/3lRbmRqQD3wufBEQ3FIBVPq4xK9u3rPpptcaMcbR6Q ZBFTsk9TCJahw== Date: Wed, 04 Mar 2026 11:45:27 +0000 To: Armin Wolf , linux-leds@vger.kernel.org, Werner Sembach From: =?utf-8?Q?P=C5=91cze_Barnab=C3=A1s?= Cc: LKML Subject: Re: Maximum values for multi_intensity sysfs attribute Message-ID: <90a08353-429c-4603-bc6f-536a789fe5fa@protonmail.com> In-Reply-To: <2d91a44e-fce2-42dc-b529-133ab4a191f0@gmx.de> References: <2d91a44e-fce2-42dc-b529-133ab4a191f0@gmx.de> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 646779018b0d266a558ff1836a2d51e8a284957a Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi 2026. 02. 14. 20:15 keltez=C3=A9ssel, Armin Wolf =C3=ADrta: > Hello, >=20 > i am currently adding support for RGB keyboard backlight control to the u= niwill-laptop > driver, and want to use the multicolor LED class for that. However the ha= rdware interface > is a bit exotic: >=20 > - 5 global brightness levels > - 50 intensity levels for each R/G/B channel >=20 > 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 in= tensity values? Is that the same interface implemented by https://github.com/pobrn/hid-ite8= 291r3 (and https://github.com/pobrn/ite8291r3-ctl)? In any case it's probably not too different. Unfortunately I don't recall e= ver finding a satisfying way to integrate it with the multi-color led things. The best ap= proach 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_componen= ts()`). Note that the above kernel driver does not implement per-key color setting, so this a= pproach seemed most sensible. Barnab=C3=A1s P=C5=91cze >=20 > Thanks, > Armin Wolf >=20 >=20