[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250805140131.284122-1-i@rong.moe>
Date: Tue, 5 Aug 2025 22:01:27 +0800
From: Rong Zhang <i@...g.moe>
To: Ike Panhc <ikepanhc@...il.com>,
"Derek J. Clark" <derekjohn.clark@...il.com>,
Mark Pearson <mpearson-lenovo@...ebb.ca>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Hans de Goede <hansg@...nel.org>
Cc: Rong Zhang <i@...g.moe>,
platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] platform/x86: ideapad-laptop: Fully support auto kbd backlight
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
Powered by blists - more mailing lists