From patchwork Thu Sep 21 22:37:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 9964881 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 D632B601D5 for ; Thu, 21 Sep 2017 22:37:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C223A29525 for ; Thu, 21 Sep 2017 22:37:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6E8729686; Thu, 21 Sep 2017 22:37:54 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 5B7D329525 for ; Thu, 21 Sep 2017 22:37:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751763AbdIUWhx (ORCPT ); Thu, 21 Sep 2017 18:37:53 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38709 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbdIUWhx (ORCPT ); Thu, 21 Sep 2017 18:37:53 -0400 Received: by mail-pg0-f65.google.com with SMTP id m30so4150530pgn.5 for ; Thu, 21 Sep 2017 15:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=TKevBJVZ964zuVDAZtAXl3BbIxXJJSW0ONcuSk7BAEU=; b=ZFLoYJMicEAcNiqNB+B/fc+RZd1lNevmN48hYzccPUWSXaSD+5It0khOA/plZ3EYIV yrXSdWG/D4wKE/iCLxkf9gcW3gBNwQvPy7d73PWPSn0Ztxn6vypTZcU3BPn7oWxXpOQY 0CPBGrlTs5Bv9BRWDex0H1x+r7vE8A8xy6/h+iDQE1xUNKj/6ZdvZUz6Cjs8l5tDs8jV RIJDphAkuR2mxNH0TjZIem/bGDGcbN+q2vdV51SCgfUzP5QVXeqZh2055L0mD3bKHlTt P2KTs4zudT46lN6l54ilXYO2nLJtvLjRhUUazN723mmSAI8A2G5BJi3qvOvmCAhHzvQQ Ws5g== 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=TKevBJVZ964zuVDAZtAXl3BbIxXJJSW0ONcuSk7BAEU=; b=aroAot02fDHtsJzc7gAOGKkJjG7eC3vJ0ajIb7YhCRK2eyKK9SP3IRr+wxmkWhXrb9 tsTzU47Mp02qBQPx0eKrDzLj30SzwqTFn04Mucqm5EHwrk2OwdAmD6jqOf9L5WEIsbl2 ml4x9x7pF6csgl6tITSF2zLKkG3hwGgdd2dqpIhEB0bjdNP/DVItmOhqF6rZBcbT6FR7 Ui5gw6LUTep4H1+J1Fe1GY5oAWwYcmRDpYUiTqFpQ7ie9gdd0ExS246DnB0UJXu0w2Hs +eX4auWt9kn3Hx1iOBLyvfwyVZ/cgHDu+Nes29QEZ+rpituLzet9ied0wYGJp+Esjhvy Kpgg== X-Gm-Message-State: AHPjjUgktMUWTUQCuU2/J+P1Z1X5AIv946hKnccQHPKIaLJdVktK3rLo wDSEDnD9J3sNpYnUMfUZ+FA= X-Google-Smtp-Source: AOwi7QBcZq+OUmfj71gxeePSB4ycQtw9seKsk2migo6ghHzOl3AE2Pz1Pzcy9Ls2quqiIai/dMZbjw== X-Received: by 10.99.7.205 with SMTP id 196mr7170068pgh.356.1506033472798; Thu, 21 Sep 2017 15:37:52 -0700 (PDT) Received: from localhost.localdomain.org ([66.96.79.214]) by smtp.gmail.com with ESMTPSA id i87sm4426956pfi.184.2017.09.21.15.37.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Sep 2017 15:37:52 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: jikos@kernel.org Cc: linux-input@vger.kernel.org, toshiki.takeuchi@wacom.com, killertofu@gmail.com, Ping Cheng Subject: [PATCH] HID: hid-input: Add eraser usage to hidinput_configure_usage Date: Thu, 21 Sep 2017 15:37:06 -0700 Message-Id: <20170921223706.3289-1-ping.cheng@wacom.com> X-Mailer: git-send-email 2.13.5 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 Some tablets report eraser usage to indicate the eraser tool. But, hidinput_configure_usage doesn't support it, which led the usage falls into default as ABS_MISC. Signed-off-by: Ping Cheng --- drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 199f6a01fc62..4d36b08494fd 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel map_key_clear(BTN_STYLUS); break; + case 0x45: /* ERASER */ + map_key_clear(BTN_TOUCH); + break; + case 0x46: /* TabletPick */ case 0x5a: /* SecondaryBarrelSwitch */ map_key_clear(BTN_STYLUS2);