diff mbox series

HID: wacom: add new MobileStudio Pro support

Message ID 1561333963-12055-1-git-send-email-ping.cheng@wacom.com (mailing list archive)
State Mainlined
Commit 384225c2a7243d073495aa3a6ec07ad25d01bbfe
Delegated to: Jiri Kosina
Headers show
Series HID: wacom: add new MobileStudio Pro support | expand

Commit Message

Ping Cheng June 23, 2019, 11:52 p.m. UTC
wacom_wac_pad_event is the only routine we need to update.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>

---
Patch is based on Jiri's for-5.3/wacom branch

 drivers/hid/wacom_wac.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jiri Kosina June 26, 2019, 11:59 a.m. UTC | #1
On Sun, 23 Jun 2019, Ping Cheng wrote:

> wacom_wac_pad_event is the only routine we need to update.

I'll change this changelog to 'add product ID for new MobileStudio Pro' 
and apply.

Thanks,
diff mbox series

Patch

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index a98ad4f..8269f46 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2021,12 +2021,14 @@  static void wacom_wac_pad_event(struct hid_device *hdev, struct hid_field *field
 		 */
 		if (hdev->vendor == 0x56a &&
 		    (hdev->product == 0x34d || hdev->product == 0x34e ||  /* MobileStudio Pro */
-		     hdev->product == 0x357 || hdev->product == 0x358)) { /* Intuos Pro 2 */
+		     hdev->product == 0x357 || hdev->product == 0x358 ||  /* Intuos Pro 2 */
+		     hdev->product == 0x399)) {				  /* MobileStudio Pro */
 			value = (field->logical_maximum - value);
 
 			if (hdev->product == 0x357 || hdev->product == 0x358)
 				value = wacom_offset_rotation(input, usage, value, 3, 16);
-			else if (hdev->product == 0x34d || hdev->product == 0x34e)
+			else if (hdev->product == 0x34d || hdev->product == 0x34e ||
+				 hdev->product == 0x399)
 				value = wacom_offset_rotation(input, usage, value, 1, 2);
 		}
 		else {