Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7952022rwl; Tue, 10 Jan 2023 07:21:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8gGm5wuA3dYNTWLmEGmbhy4Igx/iY8C9zSCR4D2UfX2j6r00yCc2s6y/E48ZaqzDAjIKK X-Received: by 2002:a17:906:65a:b0:7c1:7045:1a53 with SMTP id t26-20020a170906065a00b007c170451a53mr54026585ejb.15.1673364082294; Tue, 10 Jan 2023 07:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673364082; cv=none; d=google.com; s=arc-20160816; b=uxBvanv5QqpWACEJtiseatkeUlQuCQbBdFY1HT6pu4CdtB0QzXfN/R4aaCyN6SLPm/ qwjToTGItS/fFCwk7F/LMva6xNCIy3imvI//HhrFooK96Jkd+OLGxqAAQC3mqTVjLUSq JcMRqaFAaX1dZil1ixsLb9dwm6bvcyjQGB+1C/2u/hCAriKI6PFY/SRSTZAR72jw4AP+ 6EPxKPJcpGv0bVIzOS4PDyjc4r8w9Z57WHquhY5ei3d8qFKAVqrYqyYLBW5OfPWt3HBy mG7l7tawWh/FFj3vQEUph6vys8FdGpYuG0Hw/zrHj4WXE85p9Cqq7h/Csp6626qAbfio 234A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:subject :message-id:cc:to:from:date:dkim-signature; bh=4FnHMSoDG+UwWAFI0bQdg+tPEV4Pse/8h0+mQ/LOzUw=; b=M0FlaHWsfuomMkegsxXXz32d3BI6XKU5iAXak/edcxmunAguF6D56K+Fkg66NdwoBb Iwo1nFoMOo6K/ITP3UIcnS998C2yisCMypI1EzIpt4bmpdyyjeWZLHOxresouUvVGVMS M89h8TV8keaBr/rud/P5AMPkoz5rzHq4avWi2sueIPP18ce6Sbqv85qWpb/WuIup8334 O3NNKETPVf0GlQZzsmY9yLf2hgPsNPvt6nxEEBtQQqU2BbH+tAA53IUvTNxRl51pIrRT LQluAZhK89b/3j7jsHmo8pBbtLGbMADYm4KynJ0N7YsgpIMo+zv0tdLIawzfbUFEIVrx ntdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuta.io header.s=s1 header.b=oC42p0+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuta.io Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a1709062a0400b007adc8d6b77esi9083914eje.308.2023.01.10.07.21.08; Tue, 10 Jan 2023 07:21:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@tuta.io header.s=s1 header.b=oC42p0+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tuta.io Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232398AbjAJPDw (ORCPT + 55 others); Tue, 10 Jan 2023 10:03:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233250AbjAJPDY (ORCPT ); Tue, 10 Jan 2023 10:03:24 -0500 X-Greylist: delayed 518 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 10 Jan 2023 07:03:07 PST Received: from w1.tutanota.de (w1.tutanota.de [81.3.6.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F1574F102; Tue, 10 Jan 2023 07:03:06 -0800 (PST) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w1.tutanota.de (Postfix) with ESMTP id 94710FBF999; Tue, 10 Jan 2023 14:54:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673362466; s=s1; d=tuta.io; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:Sender; bh=4FnHMSoDG+UwWAFI0bQdg+tPEV4Pse/8h0+mQ/LOzUw=; b=oC42p0+E3mdwVzXD4vM7LJqoRBTfAMDaZjHxXojVR9BKs39Zu5bBoqALQ9WRTpHZ EdrgBIGxqa+7BWM/iLQFy2GQ6e/y6YkiPqib8vkqBIShWGuuNpPjxT27BEtrHRzsOae jWolVarxOzc7T/K0d+43NlRAEaFWncmjSZ36T2YFtX+YRqJ/zadL6hCYYmgnJAPRGlw KWiu/JOnHc6rzqf9WpF01XLExRnyJslDCBMeJOphZC54F4tUyRB5qFdZqDu4AT5TLG4 LnJ5CrWl08XNRJXLnWr0X+DugidK/SniT3eGpSP+yg4YTqROwTOgkX0C04PzD0SG3Ay d3wkOqSAcw== Date: Tue, 10 Jan 2023 15:54:26 +0100 (CET) From: marco.rodolfi@tuta.io To: Jiri Kosina , Benjamin Tissoires , Linux Input , Linux Kernel Cc: Marco Rodolfi Message-ID: Subject: [PATCH] HID: Ignore battery for Elan touchscreen on Asus TP420IA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This device has a touchscreen thats report a battery even if it doesn't=20 have one.=20 Ask Linux to ignore the battery so it will not always report it as low.=20 =20 Signed-off-by: Marco Rodolfi =20 ---=20 drivers/hid/hid-ids.h =C2=A0=C2=A0| 1 +=20 drivers/hid/hid-input.c | 2 ++=20 2 files changed, 3 insertions(+)=20 =20 diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h=20 index 8f58c3c1bec3..0f525b946cd1 100644=20 --- a/drivers/hid/hid-ids.h=20 +++ b/drivers/hid/hid-ids.h=20 @@ -413,6 +413,7 @@=20 #define I2C_DEVICE_ID_HP_ENVY_X360_15 =C2=A00x2d05=20 #define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 =C2=A0=C2=A00x29CF=20 #define I2C_DEVICE_ID_HP_SPECTRE_X360_15 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A00x2817=20 +#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8=20 #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544=20 #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN =C2=A0=C2=A00x2706=20 #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN =C2=A0=C2=A00x261A=20 diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c=20 index 859aeb07542e..54e2d4066d9b 100644=20 --- a/drivers/hid/hid-input.c=20 +++ b/drivers/hid/hid-input.c=20 @@ -369,6 +369,8 @@ static const struct hid_device_id hid_battery_quirks[] = =3D {=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ HID_BLUETOOTH_DEVICE(USB_VENDO= R_ID_LOGITECH,=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0HID_BATTERY_QUIRK_IG= NORE },=20 + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, = I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN) ,=20 + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0HID_BATTERY_QUIRK_IGNORE = },=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ HID_USB_DEVICE(USB_VENDOR_ID_E= LAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0HID_BATTERY_QUIRK_IG= NORE },=20 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ HID_USB_DEVICE(USB_VENDOR_ID_E= LAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN) ,=20 -- =C2=A0 2.39.0=20 =20