From patchwork Wed Feb 15 05:26:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 9573383 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 67D0860209 for ; Wed, 15 Feb 2017 05:26:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 582FD28399 for ; Wed, 15 Feb 2017 05:26:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B79C2843E; Wed, 15 Feb 2017 05:26:36 +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 C045E28399 for ; Wed, 15 Feb 2017 05:26:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750820AbdBOF0f (ORCPT ); Wed, 15 Feb 2017 00:26:35 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34670 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbdBOF0e (ORCPT ); Wed, 15 Feb 2017 00:26:34 -0500 Received: by mail-pg0-f66.google.com with SMTP id v184so10112382pgv.1 for ; Tue, 14 Feb 2017 21:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=y3+BIKXWeYzlF6waYkCsgxOyC7rgQltcA93ot16Zyqw=; b=CTVPZqnbfFNMJEGmaeRkJRz73XXRqn2yFCr+4jmI2fq0AYkcUmMDaMzAvnMutcP0ht g1oHoP5JP8Pz+vae4PeB1csthZ5WoKUNc2z/xRJuhIJOD/mWENiUFEDN7IjaYL1JS5sS wDz7x57t5+uCVsbyYx9n+6vZHt2U7gNApILz8GdbiZlZnqmjcy6/BIlp1JNILvBwMPe1 u7erA2yCytVJ29zLFxSP4/8j9j217is5298C51TjfIb+EiLuEjYLzxYYyGbUi1ACfxqt I+D5Nh0OmJ8yEQR8WKh83fDtqn2vDlTnVwILHB8Ff4sk1ytuvGX6r/SZr6E+CuTKlffA FV8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y3+BIKXWeYzlF6waYkCsgxOyC7rgQltcA93ot16Zyqw=; b=Za+my+zNUj75vPP5E8hq2DcmAkedUfPnayECSctLGxoicCVwQvvLJAidUdqTxmL7T/ fByGEbWlR/BTib+uY4V+Y8+8PdppbO5q8iDwplKWSFUa/2TbrKfCNF5gWyMC/TWOPSBu /fDFNz44y8hn8ITKv8ujaaJxNQB6jShjBmbLEEha4mAOYnP0JR0A4YgMrlUhYlVw0Qnn KQimBKvCR7l3M+V1fn1nIUB7KJFLPI5ytZUBSctmicbCqxKYyqBR7QEu0KZ8eu2rl0bs GGIU5n3SBNSx0J5rI3QSTcdwIMi7ZF2sbDTU1J8BB06P0qSMmjDGrR0axPgGCrcU8G5e EDzg== X-Gm-Message-State: AMke39nDmr+OMZriPgda5bRPhxRqXm1GqszzC3gv02LNvCah3+sMX4G8/CphASwqAcVkHA== X-Received: by 10.99.176.68 with SMTP id z4mr1464801pgo.18.1487136393496; Tue, 14 Feb 2017 21:26:33 -0800 (PST) Received: from localhost.net (c-24-21-228-48.hsd1.wa.comcast.net. [24.21.228.48]) by smtp.gmail.com with ESMTPSA id r74sm4288832pfb.67.2017.02.14.21.26.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 21:26:33 -0800 (PST) From: Ping Cheng X-Google-Original-From: Ping Cheng To: linux-input@vger.kernel.org Cc: jikos@kernel.org, benjamin.tissoires@gmail.com, dmitry.torokhov@gmail.com, Ping Cheng , Ping Cheng Subject: [PATCH 1/3] HID: wacom: generic: add 3 tablet touch keys Date: Tue, 14 Feb 2017 21:26:21 -0800 Message-Id: <1487136381-5155-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.8.3.1 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 This patch add support to the 3 touch keys on Wacom Cintiq Pro. These touch keys are in the middile of the other two keys on the top edge of the tablet. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires Tested-by: Aaron Armstrong Skomra Acked-by: Dmitry Torokhov --- drivers/hid/wacom_wac.c | 12 ++++++++++++ drivers/hid/wacom_wac.h | 3 +++ include/uapi/linux/input-event-codes.h | 1 + 3 files changed, 16 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index d51daf5..a0135ac 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -1761,6 +1761,18 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev, wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0); features->device_type |= WACOM_DEVICETYPE_PAD; break; + case WACOM_HID_WD_BUTTONCONFIG: + wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; + break; + case WACOM_HID_WD_ONSCREEN_KEYBOARD: + wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; + break; + case WACOM_HID_WD_CONTROLPANEL: + wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0); + features->device_type |= WACOM_DEVICETYPE_PAD; + break; } switch (equivalent_usage & 0xfffffff0) { diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index 857ccee..5eba31d 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h @@ -120,6 +120,9 @@ #define WACOM_HID_WD_BATTERY_LEVEL (WACOM_HID_UP_WACOMDIGITIZER | 0x043b) #define WACOM_HID_WD_EXPRESSKEY00 (WACOM_HID_UP_WACOMDIGITIZER | 0x0910) #define WACOM_HID_WD_EXPRESSKEYCAP00 (WACOM_HID_UP_WACOMDIGITIZER | 0x0950) +#define WACOM_HID_WD_CONTROLPANEL (WACOM_HID_UP_WACOMDIGITIZER | 0x0982) +#define WACOM_HID_WD_ONSCREEN_KEYBOARD (WACOM_HID_UP_WACOMDIGITIZER | 0x0983) +#define WACOM_HID_WD_BUTTONCONFIG (WACOM_HID_UP_WACOMDIGITIZER | 0x0986) #define WACOM_HID_WD_BUTTONHOME (WACOM_HID_UP_WACOMDIGITIZER | 0x0990) #define WACOM_HID_WD_BUTTONUP (WACOM_HID_UP_WACOMDIGITIZER | 0x0991) #define WACOM_HID_WD_BUTTONDOWN (WACOM_HID_UP_WACOMDIGITIZER | 0x0992) diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h index 3af60ee..f5a8d96 100644 --- a/include/uapi/linux/input-event-codes.h +++ b/include/uapi/linux/input-event-codes.h @@ -641,6 +641,7 @@ * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.) */ #define KEY_DATA 0x277 +#define KEY_ONSCREEN_KEYBOARD 0x278 #define BTN_TRIGGER_HAPPY 0x2c0 #define BTN_TRIGGER_HAPPY1 0x2c0