summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorLuca Stefani <luca.stefani.ge1@gmail.com>2021-03-23 22:01:26 +0100
committerHans de Goede <hdegoede@redhat.com>2021-04-07 19:47:08 +0200
commitce357fd34f94bb5aff5443987c1e4fd39b8aae37 (patch)
tree3ff2f8658e903e7db46fc9d19a450675385e075c /drivers/platform
parent3d904005f6869f37fcc7188f2a15872deecbb38a (diff)
platform/x86: asus-wmi: Add param to turn fn-lock mode on by default
* On recent ZenBooks the fn-lock is disabled by default on boot while running Windows. * Add a module param ( fnlock_default ) that allows changing the default at probe time Signed-off-by: Luca Stefani <luca.stefani.ge1@gmail.com> Link: https://lore.kernel.org/r/20210323210126.145286-1-luca.stefani.ge1@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 9ca15f724343..ebaeb7bb80f5 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -47,6 +47,9 @@ MODULE_AUTHOR("Corentin Chary <corentin.chary@gmail.com>, "
MODULE_DESCRIPTION("Asus Generic WMI Driver");
MODULE_LICENSE("GPL");
+static bool fnlock_default = true;
+module_param(fnlock_default, bool, 0444);
+
#define to_asus_wmi_driver(pdrv) \
(container_of((pdrv), struct asus_wmi_driver, platform_driver))
@@ -2673,7 +2676,7 @@ static int asus_wmi_add(struct platform_device *pdev)
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL);
if (asus_wmi_has_fnlock_key(asus)) {
- asus->fnlock_locked = true;
+ asus->fnlock_locked = fnlock_default;
asus_wmi_fnlock_update(asus);
}