diff options
author | dragonn | 2021-10-02 18:39:30 +0200 |
---|---|---|
committer | dragonn | 2021-10-02 18:46:42 +0200 |
commit | 1a7d00bb70c5f03cf9ec04e6ab94ad47aa7be450 (patch) | |
tree | b4a3f38d9177d6b3a7fb3ef91ad184a72c01a16c /sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch | |
parent | 3fd8f33c94d648c87abfb4db970367cf6b6633a6 (diff) | |
download | aur-1a7d00bb70c5f03cf9ec04e6ab94ad47aa7be450.tar.gz |
update fan curve patch, 5.14.9, update media patches, tablet mode
Diffstat (limited to 'sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch')
-rw-r--r-- | sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch b/sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch new file mode 100644 index 000000000000..d497fb6171be --- /dev/null +++ b/sys-kernel_arch-sources-g14_files-0048-asus-nb-wmi-Allow-configuring-SW_TABLET.patch @@ -0,0 +1,58 @@ +From 0c2f287ea670acbf9d4ed68efd55b5f2b76b50ca Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Wed, 28 Jul 2021 20:35:15 +0200 +Subject: [PATCH 1/2] platform/x86: asus-nb-wmi: Allow configuring + SW_TABLET_MODE method with a module option + +Unfortunately we have been unable to find a reliable way to detect if +and how SW_TABLET_MODE reporting is supported, so we are relying on +DMI quirks for this. + +Add a module-option to specify the SW_TABLET_MODE method so that this can +be easily tested without needing to rebuild the kernel. + +BugLink: https://gitlab.freedesktop.org/libinput/libinput/-/issues/639 +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- + drivers/platform/x86/asus-nb-wmi.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c +index 0cb927f0f301..9929eedf7dd8 100644 +--- a/drivers/platform/x86/asus-nb-wmi.c ++++ b/drivers/platform/x86/asus-nb-wmi.c +@@ -41,6 +41,10 @@ static int wapf = -1; + module_param(wapf, uint, 0444); + MODULE_PARM_DESC(wapf, "WAPF value"); + ++static int tablet_mode_sw = -1; ++module_param(tablet_mode_sw, uint, 0444); ++MODULE_PARM_DESC(tablet_mode_sw, "Tablet mode detect: -1:auto 0:disable 1:kbd-dock 2:lid-flip"); ++ + static struct quirk_entry *quirks; + + static bool asus_q500a_i8042_filter(unsigned char data, unsigned char str, +@@ -477,6 +481,21 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver) + else + wapf = quirks->wapf; + ++ switch (tablet_mode_sw) { ++ case 0: ++ quirks->use_kbd_dock_devid = false; ++ quirks->use_lid_flip_devid = false; ++ break; ++ case 1: ++ quirks->use_kbd_dock_devid = true; ++ quirks->use_lid_flip_devid = false; ++ break; ++ case 2: ++ quirks->use_kbd_dock_devid = false; ++ quirks->use_lid_flip_devid = true; ++ break; ++ } ++ + if (quirks->i8042_filter) { + ret = i8042_install_filter(quirks->i8042_filter); + if (ret) { +-- +2.31.1 |