HID: wacom: Replace WACOM_QUIRK_MONITOR with WACOM_DEVICETYPE_WL_MONITOR

The monitor interface on the wireless receiver is more logically expressed
as a type of device instead of a quirk.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
Jason Gerecke 2015-08-03 10:17:04 -07:00 committed by Jiri Kosina
parent 8dc8641e61
commit ccad85cc1e
3 changed files with 5 additions and 7 deletions

View File

@ -454,7 +454,7 @@ static void wacom_retrieve_hid_descriptor(struct hid_device *hdev,
*/ */
if (features->type == WIRELESS) { if (features->type == WIRELESS) {
if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { if (intf->cur_altsetting->desc.bInterfaceNumber == 0) {
features->device_type = WACOM_DEVICETYPE_NONE; features->device_type = WACOM_DEVICETYPE_WL_MONITOR;
} else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) {
features->device_type |= WACOM_DEVICETYPE_TOUCH; features->device_type |= WACOM_DEVICETYPE_TOUCH;
} }
@ -1581,7 +1581,7 @@ static int wacom_probe(struct hid_device *hdev,
if (error) if (error)
goto fail_shared_data; goto fail_shared_data;
if (!(features->quirks & WACOM_QUIRK_MONITOR) && if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) &&
(features->quirks & WACOM_QUIRK_BATTERY)) { (features->quirks & WACOM_QUIRK_BATTERY)) {
error = wacom_initialize_battery(wacom); error = wacom_initialize_battery(wacom);
if (error) if (error)
@ -1615,7 +1615,7 @@ static int wacom_probe(struct hid_device *hdev,
/* Note that if query fails it is not a hard failure */ /* Note that if query fails it is not a hard failure */
wacom_query_tablet_data(hdev, features); wacom_query_tablet_data(hdev, features);
if (features->quirks & WACOM_QUIRK_MONITOR) if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
error = hid_hw_open(hdev); error = hid_hw_open(hdev);
if (wacom_wac->features.type == INTUOSHT && if (wacom_wac->features.type == INTUOSHT &&

View File

@ -2330,9 +2330,7 @@ void wacom_setup_device_quirks(struct wacom *wacom)
/* monitor never has input and pen/touch have delayed create */ /* monitor never has input and pen/touch have delayed create */
features->quirks |= WACOM_QUIRK_NO_INPUT; features->quirks |= WACOM_QUIRK_NO_INPUT;
/* must be monitor interface if no device_type set */ if (features->device_type == WACOM_DEVICETYPE_WL_MONITOR) {
if (features->device_type == WACOM_DEVICETYPE_NONE) {
features->quirks |= WACOM_QUIRK_MONITOR;
features->quirks |= WACOM_QUIRK_BATTERY; features->quirks |= WACOM_QUIRK_BATTERY;
} }
} }

View File

@ -69,7 +69,6 @@
/* device quirks */ /* device quirks */
#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001 #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001
#define WACOM_QUIRK_NO_INPUT 0x0002 #define WACOM_QUIRK_NO_INPUT 0x0002
#define WACOM_QUIRK_MONITOR 0x0004
#define WACOM_QUIRK_BATTERY 0x0008 #define WACOM_QUIRK_BATTERY 0x0008
/* device types */ /* device types */
@ -77,6 +76,7 @@
#define WACOM_DEVICETYPE_PEN 0x0001 #define WACOM_DEVICETYPE_PEN 0x0001
#define WACOM_DEVICETYPE_TOUCH 0x0002 #define WACOM_DEVICETYPE_TOUCH 0x0002
#define WACOM_DEVICETYPE_PAD 0x0004 #define WACOM_DEVICETYPE_PAD 0x0004
#define WACOM_DEVICETYPE_WL_MONITOR 0x0008
#define WACOM_VENDORDEFINED_PEN 0xff0d0001 #define WACOM_VENDORDEFINED_PEN 0xff0d0001