Skip to contentSkip to conversation

hp-wireless: add Xiaomi's hardware id to the supported list

PATCH In review Alex Hung 2 participants 2 messages Apr 6, 2017 – Apr 13, 2017 x86 platform drivers

lore
Share & tools
lore

Alex Hung

author
#0 lore raw

PATCH 1/1 hp-wireless: add Xiaomi's hardware id to the supported list

The airplane mode button on Xiaomi's new laptops are the same as HP laptops.

This is tested on Xiaomi Notebook Air 13.

---
 drivers/platform/x86/hp-wireless.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/platform/x86/hp-wireless.c +6 -4
index 988eedb..1d4df3d 100644
@@ -1,7 +1,7 @@
 /*
- *  hp-wireless button for Windows 8
+ *  Airplane mode button for HP & Xiaomi laptops
  *
- *  Copyright (C) 2014 Alex Hung <[email protected]>
+ *  Copyright (C) 2014-2017 Alex Hung <[email protected]>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -29,11 +29,13 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Alex Hung");
 MODULE_ALIAS("acpi*:HPQ6001:*");
+MODULE_ALIAS("acpi*:WSTADEF:*");
 
 static struct input_dev *hpwl_input_dev;
 
 static const struct acpi_device_id hpwl_ids[] = {
 	{"HPQ6001", 0},
+	{"WSTADEF", 0},
 	{"", 0},
 };
 
@@ -112,7 +114,7 @@ static int __init hpwl_init(void)
 {
 	int err;
 
-	pr_info("Initializing HPQ6001 module\n");
+	pr_info("Initializing HPQ6001/WSTADEF module\n");
 	err = acpi_bus_register_driver(&hpwl_driver);
 	if (err)
 		pr_err("Unable to register HP wireless control driver.\n");
@@ -122,7 +124,7 @@ static int __init hpwl_init(void)
 
 static void __exit hpwl_exit(void)
 {
-	pr_info("Exiting HPQ6001 module\n");
+	pr_info("Exiting HPQ6001/WSTADEF module\n");
 	acpi_bus_unregister_driver(&hpwl_driver);
 }
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 39 lines · Alex Hung

The airplane mode button on Xiaomi's new laptops are the same as HP laptops.

This is tested on Xiaomi Notebook Air 13.

---
 drivers/platform/x86/hp-wireless.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/platform/x86/hp-wireless.c +4 -2
index 988eedb..1d4df3d 100644
@@ -1,7 +1,7 @@
 /*
- *  hp-wireless button for Windows 8
+ *  Airplane mode button for HP & Xiaomi laptops
  *
- *  Copyright (C) 2014 Alex Hung <[email protected]>
+ *  Copyright (C) 2014-2017 Alex Hung <[email protected]>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -29,11 +29,13 @@
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Alex Hung");
 MODULE_ALIAS("acpi*:HPQ6001:*");
+MODULE_ALIAS("acpi*:WSTADEF:*");
 
 static struct input_dev *hpwl_input_dev;
 
 static const struct acpi_device_id hpwl_ids[] = {
 	{"HPQ6001", 0},
+	{"WSTADEF", 0},
 	{"", 0},
 };
 

drivers/platform/x86/hp-wireless.c static int __init hpwl_init(void) · line 117

Quoted 5 lines
drivers/platform/x86/hp-wireless.c +1 -1
@@ -112,7 +114,7 @@ static int __init hpwl_init(void)
 {
 	int err;
 
-	pr_info("Initializing HPQ6001 module\n");
+	pr_info("Initializing HPQ6001/WSTADEF module\n");

It's just a module, no need to keep the initializing/exiting messages. Rather than start adding every HID to the message, let's just drop the messages now.

Rather than resend, I've just dropped them and updated the commit, and pushed to testing. Let me know if you have any concerns.

Quoted 16 lines
drivers/platform/x86/hp-wireless.c +1 -1
 	err = acpi_bus_register_driver(&hpwl_driver);
 	if (err)
 		pr_err("Unable to register HP wireless control driver.\n");
@@ -122,7 +124,7 @@ static int __init hpwl_init(void)
 
 static void __exit hpwl_exit(void)
 {
-	pr_info("Exiting HPQ6001 module\n");
+	pr_info("Exiting HPQ6001/WSTADEF module\n");
 	acpi_bus_unregister_driver(&hpwl_driver);
 }
 
Signature · 1 line
2.7.4
Signature · 2 lines
Darren Hart
VMware Open Source Technology Center