Re: [PATCH v4 12/12] platform/x86: ideapad-laptop: Fully support auto keyboard backlight

[email protected] Sun, 02 Aug 2026 17:31:53 +0000
Newsgroups org.kernel.vger.linux-leds
Message-ID <[email protected]>
> Currently, the auto brightness mode of keyboard backlight maps to
> brightness=3D0 in LED classdev. The only method to switch to such a 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.
>=20
> With brightness processing code decoupled from LED classdev, we can now
> fully support the auto brightness mode. In this mode, the keyboard
> backlight is controlled by the EC according to the ambient light sensor
> (ALS).
>=20
> To utilize this, a private hardware control trigger "ideapad-auto" is
> added, with the event handling procedure calling the
> led_trigger_notify_hw_control_changed() interface to activate/deactivate
> the private trigger according to the current LED trigger state. To align
> with LEDS_BRIGHTNESS_HW_CHANGED, the driver neither depends on
> LEDS_TRIGGERS_HW_CHANGED nor selects it.
>=20
> Meanwhile, block brightness changes on exit to prevent the side effect
> of LED device unregistration when the private trigger is active from
> resetting the brightness to zero, so that we can retain the state of
> auto mode among boots.
>=20
> Signed-off-by: Rong Zhang <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

--=20
Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20260802-leds-trigg=
[email protected]?part=3D12