From patchwork Fri Sep 21 18:36:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trent Gamblin X-Patchwork-Id: 10610853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A3145A4 for ; Fri, 21 Sep 2018 18:37:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3587E2E3D2 for ; Fri, 21 Sep 2018 18:37:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 283DB2E6FC; Fri, 21 Sep 2018 18:37: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 834E42E3D2 for ; Fri, 21 Sep 2018 18:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391218AbeIVA1F (ORCPT ); Fri, 21 Sep 2018 20:27:05 -0400 Received: from nooskewl.ca ([149.56.101.57]:51892 "EHLO nooskewl.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391184AbeIVA1F (ORCPT ); Fri, 21 Sep 2018 20:27:05 -0400 Received: by nooskewl.ca (Postfix, from userid 114) id 343527E055; Fri, 21 Sep 2018 14:36:57 -0400 (EDT) Received: from [IPv6:2001:56a:7568:d900:554a:f6fc:a6cc:a924] (node-1w7jr9yaiyrh94sv7wxy9mp0k.ipv6.telus.net [IPv6:2001:56a:7568:d900:554a:f6fc:a6cc:a924]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by nooskewl.ca (Postfix) with ESMTPSA id C46CF7E040 for ; Fri, 21 Sep 2018 14:36:56 -0400 (EDT) To: linux-input@vger.kernel.org From: Trent Gamblin Subject: [PATCH] Ignore faulty battery on specific touchscreen Organization: Nooskewl Message-ID: <18fd06cd-a71f-e852-55fe-a2c4d2760b09@nooskewl.ca> Date: Fri, 21 Sep 2018 12:36:48 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US 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 A certain ELAN touchscreen has a stylus battery that always reports 1%, even with known good batteries. This will popup a notification any time it's used. This patch uses a HID battery quirk to ignore the battery on the device. diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 5146ee029db4..ee4bbc8bf672 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -374,6 +374,7 @@ #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401 #define USB_DEVICE_ID_HP_X2 0x074d #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 +#define USB_DEVICE_ID_DELL_5379 0x2361 #define USB_VENDOR_ID_ELECOM 0x056e #define USB_DEVICE_ID_ELECOM_BM084 0x0061 diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index a481eaf39e88..b3236850210f 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -325,6 +325,8 @@ static const struct hid_device_id hid_battery_quirks[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084), HID_BATTERY_QUIRK_IGNORE }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_DELL_5379), + HID_BATTERY_QUIRK_IGNORE }, {} };