From: Luca Stefani <luca.stefani.ge1@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Luca Stefani <luca.stefani.ge1@gmail.com>,
Corentin Chary <corentin.chary@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
Mark Gross <mgross@linux.intel.com>,
acpi4asus-user@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v3] platform/x86: asus-wmi: Add param to turn fn-lock mode on by default
Date: Tue, 23 Mar 2021 22:01:26 +0100 [thread overview]
Message-ID: <20210323210126.145286-1-luca.stefani.ge1@gmail.com> (raw)
In-Reply-To: <20210323202505.141496-1-luca.stefani.ge1@gmail.com>
* 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>
---
drivers/platform/x86/asus-wmi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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);
}
--
2.31.0
next prev parent reply other threads:[~2021-03-23 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 20:25 [PATCH v2] platform/x86: asus-wmi: Add param to turn fn-lock mode on by default Luca Stefani
2021-03-23 20:58 ` Hans de Goede
2021-03-23 21:01 ` Luca Stefani [this message]
2021-04-07 11:22 ` [PATCH v3] " Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210323210126.145286-1-luca.stefani.ge1@gmail.com \
--to=luca.stefani.ge1@gmail.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).