platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] platform/x86: ideapad-laptop: Fully support auto kbd backlight
@ 2025-08-05 14:01 Rong Zhang
  2025-08-05 14:01 ` [PATCH 1/2] platform/x86: ideapad-laptop: Decouple HW & cdev brightness for " Rong Zhang
  2025-08-05 14:01 ` [PATCH 2/2] platform/x86: ideapad-laptop: Fully support auto " Rong Zhang
  0 siblings, 2 replies; 11+ messages in thread
From: Rong Zhang @ 2025-08-05 14:01 UTC (permalink / raw)
  To: Ike Panhc, Derek J. Clark, Mark Pearson, Ilpo Järvinen,
	Hans de Goede
  Cc: Rong Zhang, platform-driver-x86, linux-kernel

Hi all,

Some recent models supported by ideapad-laptop come with an ambient
light sensor (ALS). On these models, their EC will automatically set the
keyboard backlight to an appropriate brightness when the effective "HW
brightness" is 3. The term "HW brightness" means that it cannot be
perfectly mapped to an LED classdev brightness, but the EC does use this
predefined brightness value to represent such a mode.

Currently, the auto brightness mode of keyboard backlight maps to
brightness=0 in LED classdev. The only method to switch to this mode is
by pressing the manufacturer-defined shortcut (Fn+Space). However, 0 is
a multiplexed brightness value; writing 0 simply results in the
backlight being turned off.

Fully support this mode by adding a sysfs node:
/sys/class/leds/platform::kbd_backlight/als_enabled. The name is chosen
to align with dell-laptop, which provides a similar feature.

Thanks,
Rong

Rong Zhang (2):
  platform/x86: ideapad-laptop: Decouple HW & cdev brightness for kbd
    backlight
  platform/x86: ideapad-laptop: Fully support auto kbd backlight

 .../ABI/testing/sysfs-platform-ideapad-laptop |  12 ++
 drivers/platform/x86/lenovo/ideapad-laptop.c  | 186 ++++++++++++++----
 2 files changed, 163 insertions(+), 35 deletions(-)


base-commit: 7e161a991ea71e6ec526abc8f40c6852ebe3d946
-- 
2.50.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-08-15 20:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 14:01 [PATCH 0/2] platform/x86: ideapad-laptop: Fully support auto kbd backlight Rong Zhang
2025-08-05 14:01 ` [PATCH 1/2] platform/x86: ideapad-laptop: Decouple HW & cdev brightness for " Rong Zhang
2025-08-06 11:19   ` Ilpo Järvinen
2025-08-06 13:22     ` Rong Zhang
2025-08-05 14:01 ` [PATCH 2/2] platform/x86: ideapad-laptop: Fully support auto " Rong Zhang
2025-08-06 11:26   ` Ilpo Järvinen
2025-08-06 13:28     ` Rong Zhang
2025-08-06 19:02   ` Mark Pearson
2025-08-07 14:50     ` Rong Zhang
2025-08-08 17:57       ` Mark Pearson
2025-08-15 20:36         ` Rong Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).