Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD07C678DB for ; Wed, 15 Feb 2023 20:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229845AbjBOUqd (ORCPT ); Wed, 15 Feb 2023 15:46:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjBOUqW (ORCPT ); Wed, 15 Feb 2023 15:46:22 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E48743472; Wed, 15 Feb 2023 12:46:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EED5261D98; Wed, 15 Feb 2023 20:46:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E632C4339E; Wed, 15 Feb 2023 20:46:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676493969; bh=6pmdByL0iWO6Ik3i4eTihNuY/dP5ebn24tkC6/0m1tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IAJ+jlbZwVRwD2+40GKy7N1G7tThOjCHQI/0Q572wpgPftVa57l/lbPe3Pd3MzGR5 eW2OexGsLNBR7WMIt3df0ASBDAwjl6Wpu8M5duTl3dF/uP3/EXEcKjZ4oErcS/odIU qLwWIS97+BumSeLHfsJgcsVDGNSkTNfpvbVhO1lKiSZiuBulTiLZMR+ccy2N/l1WYW 4Q5GPmwnTu7DVz5o/bpgwvyDzqIA7SsYB107Pt9eFkYOUaEQ7hy3Hw/rRzKEf5Bf11 J3y1N0MBQ/z2rTATWp9XbK3Rf1D0G30Y8pz5nBKn+lpuAJzXBQ4fma1mhovrQ/5ui2 5e/m/zvtcpqyg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "marco.rodolfi@tuta.io" , Jiri Kosina , Sasha Levin , jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 08/24] HID: Ignore battery for Elan touchscreen on Asus TP420IA Date: Wed, 15 Feb 2023 15:45:31 -0500 Message-Id: <20230215204547.2760761-8-sashal@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230215204547.2760761-1-sashal@kernel.org> References: <20230215204547.2760761-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "marco.rodolfi@tuta.io" [ Upstream commit cb963b2c011a62838852c902eccb3f72e5d3dbb6 ] This device has a touchscreen thats report a battery even if it doesn't have one. Ask Linux to ignore the battery so it will not always report it as low. [jkosina@suse.cz: fix whitespace damage] Signed-off-by: Marco Rodolfi Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index d01d798ebedca..46c0ce4203c08 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -413,6 +413,7 @@ #define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF #define I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV 0x2CF9 #define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 +#define I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN 0x2BC8 #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544 #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706 #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 3ee5a9fea20e6..3736b0afbff73 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -370,6 +370,8 @@ static const struct hid_device_id hid_battery_quirks[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_ASUS_TP420IA_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN), HID_BATTERY_QUIRK_IGNORE }, { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN), -- 2.39.0