From patchwork Thu Jul 9 18:11:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 6758201 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 09A0D9F380 for ; Thu, 9 Jul 2015 18:11:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DC7320647 for ; Thu, 9 Jul 2015 18:11:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F8D02049C for ; Thu, 9 Jul 2015 18:11:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbbGISLy (ORCPT ); Thu, 9 Jul 2015 14:11:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35990 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbbGISLx (ORCPT ); Thu, 9 Jul 2015 14:11:53 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 338DE3F0A68; Thu, 9 Jul 2015 18:11:53 +0000 (UTC) Received: from t540p.bos.redhat.com (dhcp-25-158.bos.redhat.com [10.18.25.158]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t69IBpNL003435; Thu, 9 Jul 2015 14:11:52 -0400 From: Benjamin Tissoires To: Jason Gerecke , Jiri Kosina , Ping Cheng , Aaron Skomra Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] HID: wacom: remove the extra Pen interface for Wacom Bamboo PAD Date: Thu, 9 Jul 2015 14:11:51 -0400 Message-Id: <1436465511-5680-1-git-send-email-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 As mentioned in the comment in the code, both the pen and touch data come from the interface tagged as BAMBOO_PAD. The driver re-routes the events for the Pen to the generic HID interface and keeps the ones for the touch through this current interface. Clearing the WACOM_DEVICETYPE_PEN bit removes the extra unused interface added in 2a6cdbd ("HID: wacom: Introduce new 'touch_input' device") and makes the Bamboo PAD to behave like in 4.1. Reviewed-by: Jason Gerecke Signed-off-by: Benjamin Tissoires --- drivers/hid/wacom_wac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 0d24423..baba9a0 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2223,10 +2223,10 @@ void wacom_setup_device_quirks(struct wacom *wacom) * 0, whose HID descriptor has an application usage of 0xFF0D * (i.e., WACOM_VENDORDEFINED_PEN). We route pen packets back * out through the HID_GENERIC device created for interface 1, - * so rewrite this one to be of type BTN_TOOL_FINGER. + * so rewrite this one to be of type WACOM_DEVICETYPE_TOUCH. */ if (features->type == BAMBOO_PAD) - features->device_type |= WACOM_DEVICETYPE_TOUCH; + features->device_type = WACOM_DEVICETYPE_TOUCH; if (wacom->hdev->bus == BUS_BLUETOOTH) features->quirks |= WACOM_QUIRK_BATTERY;