From patchwork Tue Jun 3 00:19:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 4284571 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 638869F326 for ; Tue, 3 Jun 2014 00:19:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 54BF12017A for ; Tue, 3 Jun 2014 00:19:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 808B620179 for ; Tue, 3 Jun 2014 00:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbaFCATy (ORCPT ); Mon, 2 Jun 2014 20:19:54 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:61992 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752053AbaFCATy (ORCPT ); Mon, 2 Jun 2014 20:19:54 -0400 Received: by mail-pd0-f175.google.com with SMTP id z10so3925615pdj.6 for ; Mon, 02 Jun 2014 17:19:53 -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; bh=V1u5FIRcjuiqalv63dbnpHIfPe20k38StO1K1pD7a6o=; b=B0xjUZVQyh1N8HKn+MNSqmwaNjd2viSLYU2O5AKowj1aUo0C10RstiFtWGOwkUjYsn CFLKb69RrPlXZSfJmiWemtd1olA1qH8CmZyIODCOGc43tQ3rkye97lniAC0mZuzOHAbh 7jxlBNkjtMSQKPI+E8dN/jcnvRl8L6x+EwraZBFI21SyqDT0SbVFEc63F3kWiTx8EjjQ BTU2HqDQbtSfBLFh2603w+UC+iWzdj0sEgPmCVsg76KTjRQrBcKMDI1VFpMt3Ef4nydk MYRRStV/fkATk1ZN5BHa+9ZyQL8XDaJDeWe+uAz1k31my6U6tDlGUiiJXq1YppYLX+3e f8Jw== X-Received: by 10.66.155.166 with SMTP id vx6mr37897904pab.85.1401754793688; Mon, 02 Jun 2014 17:19:53 -0700 (PDT) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id rc3sm22469162pbc.5.2014.06.02.17.19.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jun 2014 17:19:52 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: linux-input@vger.kernel.org Cc: jkosina@suse.cz, dmitry.torokhov@gmail.com, Ping Cheng Subject: [PATCH] HID: input - Add two new usages for digitizer Date: Mon, 2 Jun 2014 17:19:52 -0700 Message-Id: <1401754792-5607-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.1 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 On Feb 17, 2014, two new usages are approved to HID usage Table 18 - Digitizer Page: 5A Secondary Barrel Switch MC 16.4 5B Transducer Serial Number SV 16.3.1 This patch adds relevant definitions to hid/input. It also removes outdated comments in hid.h. Signed-off-by: Ping Cheng Reviewed-by: Benjamin Tissoires --- drivers/hid/hid-debug.c | 2 ++ drivers/hid/hid-input.c | 5 +++++ include/linux/hid.h | 7 ++----- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index 53b771d..f299f42 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -165,6 +165,8 @@ static const struct hid_usage_entry hid_usage_table[] = { {0, 0x53, "DeviceIndex"}, {0, 0x54, "ContactCount"}, {0, 0x55, "ContactMaximumNumber"}, + {0, 0x5A, "SecondaryBarrelSwitch"}, + {0, 0x5B, "TransducerSerialNumber"}, { 15, 0, "PhysicalInterfaceDevice" }, {0, 0x00, "Undefined"}, {0, 0x01, "Physical_Interface_Device"}, diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index e7e8b19..da0267e 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -684,9 +684,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel break; case 0x46: /* TabletPick */ + case 0x5a: /* SecondaryBarrelSwitch */ map_key_clear(BTN_STYLUS2); break; + case 0x5b: /* TransducerSerialNumber */ + set_bit(MSC_SERIAL, input->mscbit); + break; + default: goto unknown; } break; diff --git a/include/linux/hid.h b/include/linux/hid.h index 720e3a1..a468ec8 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -233,11 +233,6 @@ struct hid_item { #define HID_DG_BARRELSWITCH 0x000d0044 #define HID_DG_ERASER 0x000d0045 #define HID_DG_TABLETPICK 0x000d0046 -/* - * as of May 20, 2009 the usages below are not yet in the official USB spec - * but are being pushed by Microsft as described in their paper "Digitizer - * Drivers for Windows Touch and Pen-Based Computers" - */ #define HID_DG_CONFIDENCE 0x000d0047 #define HID_DG_WIDTH 0x000d0048 #define HID_DG_HEIGHT 0x000d0049 @@ -246,6 +241,8 @@ struct hid_item { #define HID_DG_DEVICEINDEX 0x000d0053 #define HID_DG_CONTACTCOUNT 0x000d0054 #define HID_DG_CONTACTMAX 0x000d0055 +#define HID_DG_BARRELSWITCH2 0x000d005a +#define HID_DG_TOOLSERIALNUMBER 0x000d005b /* * HID report types --- Ouch! HID spec says 1 2 3!