From patchwork Thu Dec 8 00:18:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 9465481 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 4C49D60512 for ; Thu, 8 Dec 2016 00:19:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A5A428599 for ; Thu, 8 Dec 2016 00:19:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F40C285A4; Thu, 8 Dec 2016 00:19:00 +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 0350C28599 for ; Thu, 8 Dec 2016 00:18:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933614AbcLHAS4 (ORCPT ); Wed, 7 Dec 2016 19:18:56 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35657 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932827AbcLHASz (ORCPT ); Wed, 7 Dec 2016 19:18:55 -0500 Received: by mail-pg0-f68.google.com with SMTP id p66so24946848pga.2 for ; Wed, 07 Dec 2016 16:18:55 -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=vQqxznNWaPIMdXMxScefDS0xU6i6B10xSqMR5Kxfolc=; b=n/yYdG+1oZlE+PJoxa2UheUn1NPU2ZYOkB9cvfuJZyn/l/Ewgtgs8qSl5/D89BM0Mg SSHqBX4QRpR4mWpjpHJzpyyQz6PjzR2USEhhTU8ciGStPvBTGqWmKWQ1wauOfiA5Ez9J 9Fib4WKfnl36/oD6EZPHjKBw9QG5YHkWmt8a5qhDBnyYM3LkEfn7l2ZBcw3vdgCuOYPG DPs8jJSJKoCBWk968flonTtWCSuYkrptjcWzL5dOCLGk/MmpStmdAfXvS71Vw+M8b1AL YTj3heOEjmmrWpZtJos2xw9y6bV5FYyMELhkdK3ddnuufbGKXRkJXOIrUpRk25s65J5d +KFQ== 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=vQqxznNWaPIMdXMxScefDS0xU6i6B10xSqMR5Kxfolc=; b=V2/sQXgRC8QItoF3mAv47dqh2nXuDd3mxLo8ds9F5IWzsKCJZ/DUG1q9ba6t+A30OW A7kide5m/zwyvMQRKSC10NJbmffpztsN/MomSLIG7WapLYRGxmK9EV83xtdDokYxUoV4 X4iS38qHtEQJl4L5R7VjaX6mLZvVa8lxQszTj0v0d/qQs9DJmCer5p4RWiuiWWLqwFCW qX+P93qCxyiJ8l9gYfE8YE3qkREFW2MnOVrW9xV11YwO4ZMursWov7EUrVMK/3ufrx5f TyAnHEKuIzbqg6OZD7gNhn5hmhAnOaVrudXw+IfhJxEbVqmEcaI4IqU+Ij8EFlZP6jUh Z5DA== X-Gm-Message-State: AKaTC032BolgmZmSoxk6mNQS36zurbFi6DB3MSz2tJpKNmOUIuNjPHIHW4f5aUYY5GmNdA== X-Received: by 10.84.217.20 with SMTP id o20mr153445444pli.28.1481156335259; Wed, 07 Dec 2016 16:18:55 -0800 (PST) Received: from wacom-XPS-8500.corp.onewacom.com ([50.225.60.4]) by smtp.gmail.com with ESMTPSA id r74sm45030745pfl.79.2016.12.07.16.18.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 16:18:54 -0800 (PST) From: Ping Cheng X-Google-Original-From: Ping Cheng To: linux-input@vger.kernel.org Cc: jkosina@suse.cz, benjamin.tissoires@redhat.com, Ping Cheng , Ping Cheng Subject: [PATCH 3/4] HID: wacom: generic: Pad supports more than buttons Date: Wed, 7 Dec 2016 16:18:41 -0800 Message-Id: <1481156321-5356-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 2.7.4 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 Make sure everything reported from pad are registered Signed-off-by: Ping Cheng --- drivers/hid/wacom_wac.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 29d2610..7a748a7 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1538,14 +1538,17 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, case WACOM_HID_WD_ACCELEROMETER_X: __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); wacom_map_usage(input, usage, field, EV_ABS, ABS_X, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_ACCELEROMETER_Y: __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); wacom_map_usage(input, usage, field, EV_ABS, ABS_Y, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_ACCELEROMETER_Z: __set_bit(INPUT_PROP_ACCELEROMETER, input->propbit); wacom_map_usage(input, usage, field, EV_ABS, ABS_Z, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_BUTTONHOME: case WACOM_HID_WD_BUTTONUP: @@ -1557,18 +1560,23 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, wacom_numbered_button_to_key(features->numbered_buttons), 0); features->numbered_buttons++; + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_TOUCHONOFF: wacom_map_usage(input, usage, field, EV_SW, SW_MUTE_DEVICE, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_TOUCHSTRIP: wacom_map_usage(input, usage, field, EV_ABS, ABS_RX, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_TOUCHSTRIP2: wacom_map_usage(input, usage, field, EV_ABS, ABS_RY, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; case WACOM_HID_WD_TOUCHRING: wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; break; } @@ -1578,6 +1586,7 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, wacom_numbered_button_to_key(features->numbered_buttons), 0); features->numbered_buttons++; + features->device_type |= WACOM_DEVICETYPE_PAD; break; } }