From patchwork Fri Nov 11 23:05:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 9423771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1E5160484 for ; Fri, 11 Nov 2016 23:06:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C93228236 for ; Fri, 11 Nov 2016 23:06:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8124C29BCB; Fri, 11 Nov 2016 23:06:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7834428236 for ; Fri, 11 Nov 2016 23:06:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756200AbcKKXGH (ORCPT ); Fri, 11 Nov 2016 18:06:07 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32784 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014AbcKKXGH (ORCPT ); Fri, 11 Nov 2016 18:06:07 -0500 Received: by mail-wm0-f66.google.com with SMTP id u144so509037wmu.0 for ; Fri, 11 Nov 2016 15:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=RenKamt9P0ZFslWIoOw/AJ1uZFJh/P8Zu4HG2dAjs10=; b=EmHjDMhC0WAvvGHbkmGVXjzHQ87rniVhjIoi6MEdn62YIQ1PlTJiUyXyT2mv5T6pFL HHnUOiLuQ0YLu0g2GpCFVmhAAqmvVa//VVYFk5naACea5n2i6PlCyV/9z6aVYnTmWO5x Jrvh2HEUK5R+5uZVbif45TYw4dz1Enw2jS/Ag6BqtFX4CsGEe57mj8PX4UjzXNHpmC9K Y/eKFurgWEUAq2PCATaF0Xpc/jqQikfBd2W397VpJOJTLsQLPZ0asqVokjCHkEUiZ03i RZb9V/JLRBVQuHJma8BmtfAwURXDf4BtqERPvWeIqWETSP2M67s00TK8QN+/HfjPEr4c F+sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RenKamt9P0ZFslWIoOw/AJ1uZFJh/P8Zu4HG2dAjs10=; b=Nl4xetNnk7i5SO6nNRxIC2LHZelBe5djyjZ00NdFK7VmqfQpRqmBC9c8xpx+e/Sjp6 u4Tg9n9nz6pPjyNgRHLkwJBKgw8F6ZNaIZsPU4gxUKzKt0bi9VATAL0b1DdvCTRyCZce EDR1UvNpiogqNG84s1bYdCcgOVTLrpIF8aei7bZ1W098DNTstiUkVyjRyomOMMmws+4k 1QLkJ6+oRB3ibc+FcMRXuvk+unZEjmpRdib0jf68hvxl/h9kaltqFXhuKdclNLfLML7k o27pqtXS36pjQQB6QCs7NK1mjvhIaIhU7e4/gjDnhCjcsaGNhfRYTnZcAwnUPTTqGC2i ADgA== X-Gm-Message-State: ABUngvcZN3kHS6SnzI6Vf+iauL5dwfm/YTNcWUtR4/7FBDRSFki+fJ9e19QvmPV+bGT28w== X-Received: by 10.28.11.17 with SMTP id 17mr314205wml.88.1478905565631; Fri, 11 Nov 2016 15:06:05 -0800 (PST) Received: from wacom-arch2.corp.onewacom.com ([50.225.60.4]) by smtp.gmail.com with ESMTPSA id hb5sm13899001wjc.5.2016.11.11.15.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 15:06:04 -0800 (PST) From: Jason Gerecke To: linux-input@vger.kernel.org, Jiri Kosina Cc: Ping Cheng , Aaron Skomra , Benjamin Tissoires , Jason Gerecke , Jason Gerecke Subject: [PATCH] HID: wacom: Declare tool ID 0x84a as an Intuos eraser Date: Fri, 11 Nov 2016 15:05:52 -0800 Message-Id: <20161111230552.4221-1-killertofu@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The eraser end of the 8K pen available for the MobileStudio Pro has a tool ID of 0x84a. The 'wacom_intuos_get_tool_type' function does not currently recognize this ID, causing it to return BTN_TOOL_PEN rather than BTN_TOOL_RUBBER. This does not cause a problem for the MobileStudio Pro since, as a HID_GENERIC device, the driver relies on the state of the HID_DG_INVERT usage instead. It would, however, cause problems if the pen is used with devices that use the traditional 'wacom_intuos_irq' codepath instead. Signed-off-by: Jason Gerecke Acked-by: Benjamin Tissoires --- drivers/hid/wacom_wac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 0723ba8..55857bf 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -645,6 +645,7 @@ static int wacom_intuos_get_tool_type(int tool_id) break; case 0x82a: /* Eraser */ + case 0x84a: case 0x85a: case 0x91a: case 0xd1a: