]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: uniwill-laptop: Properly initialize charging threshold
authorArmin Wolf <W_Armin@gmx.de>
Tue, 12 May 2026 23:21:38 +0000 (01:21 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 19 May 2026 13:52:43 +0000 (16:52 +0300)
commitc12cc42dadd85dea210d5699d4f21def827382eb
tree42544b2b49049fb7ae8a8d6e96bb539c1929d651
parent5798b46271e229dab05e47537ac30b76f81728da
platform/x86: uniwill-laptop: Properly initialize charging threshold

The EC might initialize the charge threshold with 0 to signal that
said threshold is uninitialized. Detect this and replace said value
with 100 to signal the EC that we want to take control of battery
charging. Also set the threshold to 100 if the EC-provided value
is invalid.

Fixes: d050479693bb ("platform/x86: Add Uniwill laptop driver")
Reviewed-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20260512232145.329260-2-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/uniwill/uniwill-acpi.c