All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ping Cheng <pinglinux@gmail.com>
To: linux-input@vger.kernel.org
Cc: kosina@suse.cz, dlbrewe@hotmail.com, Ping Cheng <pingc@wacom.com>
Subject: [PATCH] HID: wacom: fix Intuos wireless report id issue
Date: Mon, 26 Oct 2015 14:29:12 -0700	[thread overview]
Message-ID: <1445894952-3495-1-git-send-email-pingc@wacom.com> (raw)

Intuos Pen in wireless mode does not have the same report id (2) as
when it is in USB mode (17).

This patch also moves WIRELESS next to REMOTE in type enum so we
can group devices with similar features easily.

Reported-by: Dale Brewe <dlbrewe@hotmail.com>
Tested-by: Dale Brewe <dlbrewe@hotmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
---
 drivers/hid/wacom_sys.c | 2 +-
 drivers/hid/wacom_wac.c | 1 -
 drivers/hid/wacom_wac.h | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 125e9d5..b4de325 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -432,7 +432,7 @@ static int wacom_query_tablet_data(struct hid_device *hdev,
 			return wacom_set_device_mode(hdev, 2, 2, 2);
 		}
 	} else if (features->device_type & WACOM_DEVICETYPE_PEN) {
-		if (features->type <= BAMBOO_PT && features->type != WIRELESS) {
+		if (features->type <= BAMBOO_PT) {
 			return wacom_set_device_mode(hdev, 2, 2, 2);
 		}
 	}
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 7b37848..453da6d 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2066,7 +2066,6 @@ static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)
 	struct wacom_features *features = &wacom->features;
 
 	if ((features->type == INTUOSHT2) &&
-	    (wacom->data[0] == WACOM_REPORT_INTUOS_PEN) &&
 	    (features->device_type & WACOM_DEVICETYPE_PEN))
 		return wacom_intuos_irq(wacom);
 	else if (len == WACOM_PKGLEN_BBTOUCH)
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index 95ee92b..d9e9515 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -129,7 +129,6 @@ enum {
 	WACOM_BEE,
 	WACOM_13HD,
 	WACOM_MO,
-	WIRELESS,
 	BAMBOO_PEN,
 	INTUOSHT,
 	INTUOSHT2,
@@ -138,6 +137,7 @@ enum {
 	WACOM_24HDT,
 	WACOM_27QHDT,
 	BAMBOO_PAD,
+	WIRELESS,
 	REMOTE,
 	TABLETPC,   /* add new TPC below */
 	TABLETPCE,
-- 
1.9.1


             reply	other threads:[~2015-10-26 21:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 21:29 Ping Cheng [this message]
2015-11-02 16:41 ` [PATCH] HID: wacom: fix Intuos wireless report id issue 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=1445894952-3495-1-git-send-email-pingc@wacom.com \
    --to=pinglinux@gmail.com \
    --cc=dlbrewe@hotmail.com \
    --cc=kosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=pingc@wacom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.