From: Jason Gerecke <killertofu@gmail.com>
To: Jiri Kosina <jkosina@suse.cz>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Aaron Skomra <skomra@gmail.com>, Ping Cheng <pinglinux@gmail.com>,
linux-input@vger.kernel.org, Jason Gerecke <killertofu@gmail.com>,
Jason Gerecke <jason.gerecke@wacom.com>
Subject: [PATCH 2/3] HID: wacom: Replace WACOM_QUIRK_MONITOR with WACOM_DEVICETYPE_WL_MONITOR
Date: Mon, 3 Aug 2015 10:17:04 -0700 [thread overview]
Message-ID: <1438622225-6718-2-git-send-email-killertofu@gmail.com> (raw)
In-Reply-To: <1438622225-6718-1-git-send-email-killertofu@gmail.com>
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>
---
drivers/hid/wacom_sys.c | 6 +++---
drivers/hid/wacom_wac.c | 4 +---
drivers/hid/wacom_wac.h | 2 +-
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index a334332..13834ba 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -454,7 +454,7 @@ static void wacom_retrieve_hid_descriptor(struct hid_device *hdev,
*/
if (features->type == WIRELESS) {
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) {
features->device_type |= WACOM_DEVICETYPE_TOUCH;
}
@@ -1581,7 +1581,7 @@ static int wacom_probe(struct hid_device *hdev,
if (error)
goto fail_shared_data;
- if (!(features->quirks & WACOM_QUIRK_MONITOR) &&
+ if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) &&
(features->quirks & WACOM_QUIRK_BATTERY)) {
error = wacom_initialize_battery(wacom);
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 */
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);
if (wacom_wac->features.type == INTUOSHT &&
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 280deb2..82bb0d3 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2330,9 +2330,7 @@ void wacom_setup_device_quirks(struct wacom *wacom)
/* monitor never has input and pen/touch have delayed create */
features->quirks |= WACOM_QUIRK_NO_INPUT;
- /* must be monitor interface if no device_type set */
- if (features->device_type == WACOM_DEVICETYPE_NONE) {
- features->quirks |= WACOM_QUIRK_MONITOR;
+ if (features->device_type == WACOM_DEVICETYPE_WL_MONITOR) {
features->quirks |= WACOM_QUIRK_BATTERY;
}
}
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index c245a66..87df674 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -69,7 +69,6 @@
/* device quirks */
#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001
#define WACOM_QUIRK_NO_INPUT 0x0002
-#define WACOM_QUIRK_MONITOR 0x0004
#define WACOM_QUIRK_BATTERY 0x0008
/* device types */
@@ -77,6 +76,7 @@
#define WACOM_DEVICETYPE_PEN 0x0001
#define WACOM_DEVICETYPE_TOUCH 0x0002
#define WACOM_DEVICETYPE_PAD 0x0004
+#define WACOM_DEVICETYPE_WL_MONITOR 0x0008
#define WACOM_VENDORDEFINED_PEN 0xff0d0001
--
2.4.6
next prev parent reply other threads:[~2015-08-03 17:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 17:17 [PATCH 1/3] HID: wacom: Use calculated pkglen for wireless touch interface Jason Gerecke
2015-08-03 17:17 ` Jason Gerecke [this message]
2015-08-03 17:17 ` [PATCH 3/3] HID: wacom: Remove WACOM_QUIRK_NO_INPUT Jason Gerecke
2015-08-03 17:39 ` Benjamin Tissoires
2015-08-04 13:40 ` [PATCH 1/3] HID: wacom: Use calculated pkglen for wireless touch interface Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438622225-6718-2-git-send-email-killertofu@gmail.com \
--to=killertofu@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jason.gerecke@wacom.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=pinglinux@gmail.com \
--cc=skomra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).