From patchwork Thu Oct 20 01:03:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 9385699 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 6568C607D0 for ; Thu, 20 Oct 2016 01:04:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AA9228A07 for ; Thu, 20 Oct 2016 01:04:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E9FD296FC; Thu, 20 Oct 2016 01:04:47 +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 764E8296E3 for ; Thu, 20 Oct 2016 01:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071AbcJTBEn (ORCPT ); Wed, 19 Oct 2016 21:04:43 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36597 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754559AbcJTBEm (ORCPT ); Wed, 19 Oct 2016 21:04:42 -0400 Received: by mail-pf0-f196.google.com with SMTP id r16so3825910pfg.3 for ; Wed, 19 Oct 2016 18:04:42 -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:in-reply-to:references; bh=BZ/+jbtsUZtknJNT7Wiv2vJNniDxGcE6WpV3rG7rO9k=; b=sXZmQWkDAgx+whpTmv0ur3O7/IvrHhppftMS9/3QpeDdAD4nfeT/8g+8ICfW3gFSnN AY054GsNC4RCWe2uXZZC6AIQM5O0t95RdcHkri05ep+Q7WJjEy2dLwfbUPGlt2H1QMZf altoz1xJ7REgsK/lFYmCYMgWuxcnEbpOXdeBHSiQxBEd/a0h7w4euBhgYXn6TLkQdHuV /yS5HPILJXk3PTj0JSm+LxYn8/yPUVu5AkNFk8PuEmHEMsF/NqHCvSzqMdM5X5Xm0Ceq G3tVNovuD402exFnV9x9CCE06qsJ6rZl0b0tJnuoyB8FQUncOOo6XVI5MtEEf7QNVW+R IgrQ== 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:in-reply-to :references; bh=BZ/+jbtsUZtknJNT7Wiv2vJNniDxGcE6WpV3rG7rO9k=; b=ILGepMCmFJbsfdoJ+jK+BzYpiZqKtMgC9atE/2NF/7OMXJE5tExKFHmvt7l2cQl3Gz b6+sLz9BnN8axrTjpswecEHB2bIaMGBsUjFMOdoinXjm1PKFdgGPr8WoM3SUDEPBgmQP sJx9ca03LFirLQMh9PY/7Nmbrq0t9ChEh8/ZEz+0HiV8Z4X4xhB6MQ6ot3Te/1wtLafJ CypWVvSu3Pj3CNACD+9dgqdNJm5nQuKfKg60ubGYauenXOIxbumCcI/aqIE33KGkHxah D4fxmq/cPs80yIy3xAMN7uaFloliElv/p/Tdes7IuMqcq/cfMGRnGx0cTJ2WK7SoIZD2 m/JQ== X-Gm-Message-State: AA6/9Rl/zCyPXvLlPK7fsPZz7vyWoXOqhoyK1VR0yIUvqBm8y53rGu8u88YFTRU2Qf/mjQ== X-Received: by 10.99.127.75 with SMTP id p11mr10859728pgn.61.1476925481030; Wed, 19 Oct 2016 18:04:41 -0700 (PDT) Received: from wtc005007.corp.onewacom.com ([50.225.60.4]) by smtp.gmail.com with ESMTPSA id d15sm877372pfl.90.2016.10.19.18.04.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 18:04:39 -0700 (PDT) From: Jason Gerecke To: linux-input@vger.kernel.org, Jiri Kosina Cc: Benjamin Tissoires , Ping Cheng , Ping Cheng , Aaron Skomra , Jason Gerecke , Jason Gerecke Subject: [PATCH v3 09/18] HID: wacom: generic: Add support for vendor-defined "Fingerwheel" usage Date: Wed, 19 Oct 2016 18:03:45 -0700 Message-Id: <20161020010354.4049-9-killertofu@gmail.com> X-Mailer: git-send-email 2.10.0 In-Reply-To: <20161020010354.4049-1-killertofu@gmail.com> References: <20161006212231.31440-1-killertofu@gmail.com> <20161020010354.4049-1-killertofu@gmail.com> 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 airbrush fingerwheel does not have a usage that corresponds cleanly with a standard HID usage, so we add explicit support for it via its vendor-defined usage. Signed-off-by: Jason Gerecke Reviewed-by: Benjamin Tissoires --- drivers/hid/wacom_wac.c | 3 +++ drivers/hid/wacom_wac.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index f78ad77..81467c9 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1539,6 +1539,9 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev, case HID_DG_TOOLSERIALNUMBER: wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0); break; + case WACOM_HID_WD_FINGERWHEEL: + wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); + break; } } diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index 63a5a25..5447559 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h @@ -89,6 +89,7 @@ #define WACOM_HID_SP_DIGITIZERINFO 0x00100000 #define WACOM_HID_WD_DIGITIZER (WACOM_HID_UP_WACOMDIGITIZER | 0x01) #define WACOM_HID_WD_DISTANCE (WACOM_HID_UP_WACOMDIGITIZER | 0x0132) +#define WACOM_HID_WD_FINGERWHEEL (WACOM_HID_UP_WACOMDIGITIZER | 0x0d03) #define WACOM_HID_WD_DATAMODE (WACOM_HID_UP_WACOMDIGITIZER | 0x1002) #define WACOM_HID_UP_G9 0xff090000 #define WACOM_HID_G9_PEN (WACOM_HID_UP_G9 | 0x02)