On Thu, 3 Dec 2026, Rong Zhang wrote: > Hi Punnay, Ilpo, > > On Tue, 2026-12-01 at 19:30 +0530, Punnay Sharma wrote: > > On Tue, 1 Dec 2026 at 18:33, Ilpo Järvinen > > wrote: > > > > > Hi all, > > > > > > Given what Punnay says above about BIT(0) and what Arnav's device reports > > > [1], does the BIT(0) have anything to do with the backlight type?  > > > > > We don't know. While we believe it's safe to assume that (KBLC(whatever) > & BIT(0)) == 0 implies a stubbed KBLC method, the opposite case seems > more complicated. > > Basically BIT(0) is always 1 on devices implement the method (i.e., not > stubbed), so by stripping it (>> 1) we got: > > 0 - unknown (none?) > 1 - unknown (off, on?) > 2 - off, low, high > 3 - off, low, high, auto > > While it's quite natural to make the assumptions in the parentheses, > firmware is usually unnatural. We don't need that derivation for case 1 for deciding if BIT(0) counts or not? And we do have some evidence on what case 0 means. I'm not asking guessing the remaining case 1 is but how to solve the both reported issues when it comes to the warning in what looks most logical way given the existing, known cases. -- i. > > > If not, > > > why are we using that bit while reporting an error about unknown backlight > > > type? > > > > > > [1] https://lore.kernel.org/all/20261126073107.765676-1-kapoorarnav43@gmail.com/ > > > > Hi all, > > > > So, to answer Ilpo's question: on my LOQ 15IRX10 the answer is No, KBLC sets > > BIT(0) first (RETD |= One) and only then checks the command, so every > > result has BIT(0) set and the actual data sits in the bits above it, > > like 0x5 -> 2 (KBD_BL_TRISTATE), 0x7 -> 3 (KBD_BL_TRISTATE_AUTO) and > > 0x1 -> 0, and the brightness read already drops BIT(0) with > > FIELD_GET(KBD_BL_GET_BRIGHTNESS, value), it's only the type check that > > uses it > > > > Arnav's V14 G2 ITL is a bit different though, as his patch says its > > type query always returns Zero, so BIT(0) is just clear there > > > > so I thought of a v2 where the type check looks at BIT(0) and gets the > > type from the bits above this, but I need your guidance on it > > > > btw the ThinkBook question from bug 221198 is still open > > Yeah, that's the exact reason why this is still pending. AFAIK the > reported device (ThinkBook 16 G6+ IMH) comes with keyboard backlight, see > https://www.notebookcheck-cn.com/Lenovo-ThinkBook-16-G6-IMH.859769.0.html > > > According to the Chinese manual on Lenovo's website, this model also has > an ambient light sensor, which is not even optional, see > https://iknow.lenovo.com.cn/detail/419589 > > Based on the information, even if we finally should treat > KBLC(KBD_BL_QUERY_TYPE) == 1 as no KBLC control, a quirk table entry > would still be required to work around ThinkBook 16 G6+ IMH. > > So my suggestion is to take Arnav's patch (KBLC(KBD_BL_QUERY_TYPE) == 0) > this cycle and defer the KBLC(KBD_BL_QUERY_TYPE) == 1 case until the next > cycle to see if we can get more information. > > Thanks, > Rong > > > > > Thanks, > > Punnay > -- i.