From patchwork Mon Oct 26 21:29:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 7492081 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 50B229F327 for ; Mon, 26 Oct 2015 21:29:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6BFB0206B0 for ; Mon, 26 Oct 2015 21:29:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56BED206AF for ; Mon, 26 Oct 2015 21:29:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbbJZV3V (ORCPT ); Mon, 26 Oct 2015 17:29:21 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:36102 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752677AbbJZV3U (ORCPT ); Mon, 26 Oct 2015 17:29:20 -0400 Received: by pacfv9 with SMTP id fv9so208133901pac.3 for ; Mon, 26 Oct 2015 14:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=l2eSDgf32+IhUjZIU4Zw0teLEDjBOMeZUH/bmBr5V50=; b=W1k35oohoegvbpwq28xRfoKhFj34juZ+Jz/Bff+SmpWPnzgxiDIfRt3Uq1oCPZyDIx SPioHZqz+7HCiUXLOTszhz/pDehcsv2iVKqQL/hubZErRhE4yq+TwGo0vi4NcsL+271n c4tQqvDhv9BIH+eedBvzjhuCZaSk+ICrmZ81NxvPcX1ezI4S5qxr3D1g5b6zF3vkGUfy 2NfUptnkWcKgLjVk6d8XXojfDK9wfF2P+lCddDQtIvh3EyHLqLMybGnGuvi02qFk1cB+ YqR9HmolFENB4HyMCs/nYSFP1iCy7EWof1+kDQRCuCS2ZSaf7pONbxO9Ge5R/uy5mrFt w07Q== X-Received: by 10.68.137.161 with SMTP id qj1mr24540700pbb.154.1445894960135; Mon, 26 Oct 2015 14:29:20 -0700 (PDT) Received: from wacom-XPS-8500.corp.onewacom.com ([67.51.163.2]) by smtp.gmail.com with ESMTPSA id a17sm35624921pbu.55.2015.10.26.14.29.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Oct 2015 14:29:19 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: linux-input@vger.kernel.org Cc: kosina@suse.cz, dlbrewe@hotmail.com, Ping Cheng Subject: [PATCH] HID: wacom: fix Intuos wireless report id issue Date: Mon, 26 Oct 2015 14:29:12 -0700 Message-Id: <1445894952-3495-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Dale Brewe Signed-off-by: Ping Cheng --- 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,