summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/asus-wmi.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-11-20 18:42:34 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-11-23 15:24:17 +0300
commit6db829fa2f1295aaad51a3c00f6fc57a27c444bb (patch)
tree1048a2e0a8bcc6f78ef2c342f336d7a271a00ee8 /drivers/platform/x86/asus-wmi.h
parentb52cbca22cbf6c9d2700c1e576d0ddcc670e49d5 (diff)
downloadlinux-6db829fa2f1295aaad51a3c00f6fc57a27c444bb.tar.xz
platform/x86: asus-wmi: Change q500a_i8042_filter() into a generic i8042-filter
Change asus_q500a_i8042_filter() into a generic i8042-filter, using a new filter_i8042_e1_extended_codes flag in the quirks struct to decide if e1 extended codes should be filtered out or not. This is a preparation patch for adding support for filtering volume key events being reported twice through both the PS/2 keyboard and asus-wmi. Note while modifying the code also drop the unnecessary unlikely() annotations, this is not in a hot path so those are not necessary. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231120154235.610808-3-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/asus-wmi.h')
-rw-r--r--drivers/platform/x86/asus-wmi.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/platform/x86/asus-wmi.h b/drivers/platform/x86/asus-wmi.h
index adb67c925724..cc30f1853847 100644
--- a/drivers/platform/x86/asus-wmi.h
+++ b/drivers/platform/x86/asus-wmi.h
@@ -39,6 +39,7 @@ struct quirk_entry {
bool wmi_backlight_set_devstate;
bool wmi_force_als_set;
bool wmi_ignore_fan;
+ bool filter_i8042_e1_extended_codes;
enum asus_wmi_tablet_switch_mode tablet_switch_mode;
int wapf;
/*
@@ -49,9 +50,6 @@ struct quirk_entry {
*/
int no_display_toggle;
u32 xusb2pr;
-
- bool (*i8042_filter)(unsigned char data, unsigned char str,
- struct serio *serio);
};
struct asus_wmi_driver {
@@ -73,6 +71,9 @@ struct asus_wmi_driver {
* Return ASUS_WMI_KEY_IGNORE in code if event should be ignored. */
void (*key_filter) (struct asus_wmi_driver *driver, int *code,
unsigned int *value, bool *autorelease);
+ /* Optional standard i8042 filter */
+ bool (*i8042_filter)(unsigned char data, unsigned char str,
+ struct serio *serio);
int (*probe) (struct platform_device *device);
void (*detect_quirks) (struct asus_wmi_driver *driver);