intel-hid: add a DMI quirk to support Wacom MobileStudio Pro
PATCH v2 1/1 intel-hid: add a DMI quirk to support Wacom MobileStudio Pro
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
[V2] Update DMI strings from shipping systems
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197991
--- drivers/platform/x86/intel-hid.c | 41 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-)
drivers/platform/x86/intel-hid.c +38 -3
@@ -25,6 +25,7 @@#include <linux/acpi.h> #include <linux/suspend.h> #include <acpi/acpi_bus.h> +#include <linux/dmi.h> MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Alex Hung" );
@@ -73,6 +74,24 @@ static const struct key_entry intel_array_keymap[] = { { KE_END }, }; +static const struct dmi_system_id button_array_table[] = { + { + .ident = "Wacom MobileStudio Pro 13", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Wacom Co.,Ltd"), + DMI_MATCH(DMI_PRODUCT_NAME, "Wacom MobileStudio Pro 13"), + }, + }, + { + .ident = "Wacom MobileStudio Pro 16", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Wacom Co.,Ltd"), + DMI_MATCH(DMI_PRODUCT_NAME, "Wacom MobileStudio Pro 16"), + }, + }, + { } +}; + struct intel_hid_priv { struct input_dev *input_dev; struct input_dev *array;
@@ -263,10 +282,27 @@ static void notify_handler(acpi_handle handle, u32 event, void *context) ev_index); } +static bool button_array_present (struct platform_device *device) +{ +acpi_handle handle =ACPI_HANDLE (&device->dev); +unsigned long long event_cap; +acpi_status status; +bool supported = false; + + status =acpi_evaluate_integer (handle,"HEBC" ,NULL , &event_cap); +if (ACPI_SUCCESS (status) && (event_cap &0x20000 )) + supported = true; + +if (dmi_check_system (button_array_table)) + supported = true; + +return supported; +} +static int intel_hid_probe (struct platform_device *device) {acpi_handle handle =ACPI_HANDLE (&device->dev); -unsigned long long event_cap, mode; +unsigned long long mode;struct intel_hid_priv *priv;acpi_status status;int err;
@@ -299,8 +335,7 @@ static int intel_hid_probe(struct platform_device *device) }/* Setup 5 button array */ - status =acpi_evaluate_integer (handle,"HEBC" ,NULL , &event_cap); -if (ACPI_SUCCESS (status) && (event_cap &0x20000 )) { +if (button_array_present (device)) {dev_info (&device->dev,"platform supports 5 button array\n" ); err =intel_button_array_input_setup (device);if (err)
Signature · 1 line
2.7.4
Quoted 3 lines · Alex Hung
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
Jason, have you been able to verify this patch with testing?
Quoted 1 line
[V2] Update DMI strings from shipping systems
Please place patch versioning detail below the --- in the future
Quoted 5 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197991
Reported-by Jason Gerecke <[email protected]>Signed-off-by Alex Hung <[email protected]>---
here (see submitting patches docs for details)
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Jason Gerecke
Tested-byQuoted 7 lines · Darren Hart
Quoted 3 lines · Alex Hung
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
Jason, have you been able to verify this patch with testing?
I tested the attachment at [1], which produces an identical copy of intel-hid.c as applying this patch to the platform-drivers-x86/review-dvhart branch ofgit://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git.
Assuming that's the correct code, feel free to attach the following:
[1]: https://bugzilla.kernel.org/attachment.cgi?id=261033
Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....
Quoted 16 lines
Quoted 1 line
[V2] Update DMI strings from shipping systems
Please place patch versioning detail below the --- in the future
Quoted 5 lines
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197991
Reported-by Jason Gerecke <[email protected]>Signed-off-by Alex Hung <[email protected]>---
here (see submitting patches docs for details)
--
Darren Hart
VMware Open Source Technology Center
Quoted 9 lines · Jason Gerecke
Quoted 7 lines · Darren Hart
Quoted 3 lines · Alex Hung
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
Jason, have you been able to verify this patch with testing?
Quoted 7 lines
I tested the attachment at [1], which produces an identical copy of
intel-hid.cas applying this patch to the platform-drivers-x86/review-dvhart branch ofgit://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git.Assuming that's the correct code, feel free to attach the following:
Tested-by Jason Gerecke <[email protected]>
Great, thanks. Queued up for testing.
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Quoted 15 lines · Darren Hart
Quoted 14 lines · Jason Gerecke
Quoted 7 lines · Darren Hart
Quoted 3 lines · Alex Hung
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
Jason, have you been able to verify this patch with testing?
I tested the attachment at [1], which produces an identical copy of
intel-hid.cas applying this patch to the platform-drivers-x86/review-dvhart branch ofgit://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git.
Quoted 4 lines
Quoted 2 lines
Assuming that's the correct code, feel free to attach the following:
Tested-by Jason Gerecke <[email protected]>Great, thanks. Queued up for testing.
Just in case you didn't promote it yet, could you move inclusion to be more ordered alphabetically? (After linux/acpi.h I suppose)
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 16 lines · Andy Shevchenko
Quoted 15 lines · Darren Hart
Quoted 14 lines · Jason Gerecke
Quoted 7 lines · Darren Hart
Quoted 3 lines · Alex Hung
HEBC method reports capabilities of 5 button array but Wacom MobileStudio Pro does not have this control method. A DMI quirk was created to enable 5 button array for this system.
Jason, have you been able to verify this patch with testing?
I tested the attachment at [1], which produces an identical copy of
intel-hid.cas applying this patch to the platform-drivers-x86/review-dvhart branch ofgit://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Assuming that's the correct code, feel free to attach the following:
Tested-by Jason Gerecke <[email protected]>Great, thanks. Queued up for testing.
Just in case you didn't promote it yet, could you move inclusion to be more ordered alphabetically? (After
linux/acpi.hI suppose)
I had done that initially, but realized the entire list is in no apparent order and it wasn't just moving the one line he added. So it'll need to be a cleanup patch since all the test builds have run already.
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Quoted 8 lines · Darren Hart
Quoted 2 lines · Andy Shevchenko
Just in case you didn't promote it yet, could you move inclusion to be more ordered alphabetically? (After
linux/acpi.hI suppose)I had done that initially, but realized the entire list is in no apparent order and it wasn't just moving the one line he added. So it'll need to be a cleanup patch since all the test builds have run already.
Ah, fair enough.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · Andy Shevchenko
Quoted 8 lines · Darren Hart
Quoted 2 lines · Andy Shevchenko
Just in case you didn't promote it yet, could you move inclusion to be more ordered alphabetically? (After
linux/acpi.hI suppose)I had done that initially, but realized the entire list is in no apparent order and it wasn't just moving the one line he added. So it'll need to be a cleanup patch since all the test builds have run already.
Ah, fair enough.
Do you mean the includes listed alphabetically such as below? I can send a patch to clean it up.
#include <linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/suspend.h>
Quoted 4 lines
--
With Best Regards,
Andy Shevchenko
Signature · 2 lines
Cheers, Alex Hung
Quoted 8 lines · Alex Hung
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Darren Hart
Quoted 2 lines · Andy Shevchenko
Just in case you didn't promote it yet, could you move inclusion to be more ordered alphabetically? (After
linux/acpi.hI suppose)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I had done that initially, but realized the entire list is in no apparent order and it wasn't just moving the one line he added. So it'll need to be a cleanup patch since all the test builds have run already.
Ah, fair enough.
Do you mean the includes listed alphabetically such as below?
Yes.
Quoted 2 lines
I can
send a patch to clean it up.
As a standalone change it would not be required, but if you are going to send some behaviour changing or bigger clean up series, feel free to add.
Quoted 10 lines
#include <
linux/acpi.h>
#include <acpi/acpi_bus.h>
#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/suspend.h>
Signature · 2 lines
With Best Regards, Andy Shevchenko