summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_wac.h
diff options
context:
space:
mode:
authorAaron Armstrong Skomra <skomra@gmail.com>2019-05-10 15:31:16 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-31 07:28:41 +0200
commite50f797cab5069725ecd3fefa9fa96f9b2e13c75 (patch)
tree4f56e227b988a60913efc0904b09e95d9244f462 /drivers/hid/wacom_wac.h
parentddb8600472d67523f281d4380936a1ac14054af1 (diff)
HID: wacom: generic: only switch the mode on devices with LEDs
commit d8e9806005f28bbb49899dab2068e3359e22ba35 upstream. Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the kernel error message of the form: "leds input8::wacom-0.1: Setting an LED's brightness failed (-32)" This is because the generic codepath erroneously assumes that the BUTTON_CENTER usage indicates that the device has LEDs, the previously ignored TOUCH_RING_SETTING usage is a more accurate indication of the existence of LEDs on the device. Fixes: 10c55cacb8b2 ("HID: wacom: generic: support LEDs") Cc: <stable@vger.kernel.org> # v4.11+ Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/wacom_wac.h')
-rw-r--r--drivers/hid/wacom_wac.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index feb62fd4dfc3..d2fe7af2c152 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -140,6 +140,7 @@
#define WACOM_HID_WD_OFFSETBOTTOM (WACOM_HID_UP_WACOMDIGITIZER | 0x0d33)
#define WACOM_HID_WD_DATAMODE (WACOM_HID_UP_WACOMDIGITIZER | 0x1002)
#define WACOM_HID_WD_DIGITIZERINFO (WACOM_HID_UP_WACOMDIGITIZER | 0x1013)
+#define WACOM_HID_WD_TOUCH_RING_SETTING (WACOM_HID_UP_WACOMDIGITIZER | 0x1032)
#define WACOM_HID_UP_G9 0xff090000
#define WACOM_HID_G9_PEN (WACOM_HID_UP_G9 | 0x02)
#define WACOM_HID_G9_TOUCHSCREEN (WACOM_HID_UP_G9 | 0x11)