Re: [PATCH 3/6] platform/x86: uniwill-laptop: Fix behavior of "force" module param
From: Armin Wolf
Date: Fri Apr 10 2026 - 17:54:12 EST
Am 10.04.26 um 22:30 schrieb Werner Sembach:
Agree, i will do this in the v2 series.
Am 10.04.26 um 19:32 schrieb Armin Wolf:
Am 09.04.26 um 01:08 schrieb Werner Sembach:
Am 06.04.26 um 21:36 schrieb Armin Wolf:
Users might want to force-enable all possible features even onthis should already exclude the potentially harmfull "charging threshold"
machines with a valid device descriptor. Until now the "force"
module param was ignored on such machines. Fix this to make
it easier to test for support of new features.
Fixes: d050479693bb ("platform/x86: Add Uniwill laptop driver")
Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
---
drivers/platform/x86/uniwill/uniwill-acpi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/uniwill/uniwill-acpi.c b/drivers/platform/x86/uniwill/uniwill-acpi.c
index 5551f193c2c1..7c7ea0e76966 100644
--- a/drivers/platform/x86/uniwill/uniwill-acpi.c
+++ b/drivers/platform/x86/uniwill/uniwill-acpi.c
@@ -2481,8 +2481,6 @@ static int __init uniwill_init(void)
if (!force)
return -ENODEV;
- /* Assume that the device supports all features */
- device_descriptor.features = UINT_MAX;
pr_warn("Loading on a potentially unsupported device\n");
} else {
/*
@@ -2500,6 +2498,12 @@ static int __init uniwill_init(void)
device_descriptor = *descriptor;
}
+ if (force) {
+ /* Assume that the device supports all features */
+ device_descriptor.features = UINT_MAX;
+ pr_warn("Enabling potentially unsupported features\n");
+ }
+
I decided to keep this patch small so that it can be picked up by the stable team
without much fuss. Personally i believe that the charging limit should be dealt with
inside the last patch where we add support for the (safe) charging modes.
Stable should get this protection too, and it is just one more line.
Could even be an own patch with just that line
Thanks,
Armin Wolf
Thanks,
Armin Wolf
ret = platform_driver_register(&uniwill_driver);
if (ret < 0)
return ret;