summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2026-05-13 01:21:41 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-05-19 16:52:49 +0300
commit26cbe119f99c86dcb4a0136d2bc73c0c716d80e4 (patch)
tree058c9bbd81fce18c28ba51db10640568d4e30d12 /drivers/platform
parentfb4b67c44557cb4cbb15900083d4e1af22320339 (diff)
platform/x86: uniwill-laptop: Do not enable the charging limit even when forced
It seems that on some older models (~2020) the battery charging limit can permanently damage the battery. Prevent users from enabling this feature thru the "force" module parameter to avoid causing permanent hardware damage on such devices. Fixes: d050479693bb ("platform/x86: Add Uniwill laptop driver") Link: https://www.reddit.com/r/XMG_gg/comments/ld9yyf/battery_limit_hidden_function_discovered_on/ Reviewed-by: Werner Sembach <wse@tuxedocomputers.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260512232145.329260-5-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/uniwill/uniwill-acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c
index 481c4cf46e63..8cc01bec77b9 100644
--- a/drivers/platform/x86/uniwill/uniwill-acpi.c
+++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
@@ -2507,8 +2507,8 @@ static int __init uniwill_init(void)
}
if (force) {
- /* Assume that the device supports all features */
- device_descriptor.features = UINT_MAX;
+ /* Assume that the device supports all features except the charge limit */
+ device_descriptor.features = UINT_MAX & ~UNIWILL_FEATURE_BATTERY;
pr_warn("Enabling potentially unsupported features\n");
}