]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: hid-input: Extend Elan ignore battery quirk to USB
authorMario Limonciello (AMD) <superm1@kernel.org>
Thu, 30 Oct 2025 16:06:25 +0000 (11:06 -0500)
committerJiri Kosina <jkosina@suse.com>
Fri, 31 Oct 2025 09:06:36 +0000 (10:06 +0100)
USB Elan devices have the same problem as the I2C ones with a fake
battery device showing up.

Reviewed-by: Hans de Goede <hansg@kernel.org>
Reported-by: André Barata <andretiagob@protonmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220722
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-input.c

index e56e7de5327993c8cb4d16700a5f98a9662f31e2..2bbb645c2ff418d108e2ac26e91578ee8c2d7452 100644 (file)
@@ -399,10 +399,11 @@ static const struct hid_device_id hid_battery_quirks[] = {
        { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM),
          HID_BATTERY_QUIRK_AVOID_QUERY },
        /*
-        * Elan I2C-HID touchscreens seem to all report a non present battery,
-        * set HID_BATTERY_QUIRK_IGNORE for all Elan I2C-HID devices.
+        * Elan HID touchscreens seem to all report a non present battery,
+        * set HID_BATTERY_QUIRK_IGNORE for all Elan I2C and USB HID devices.
         */
        { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, HID_ANY_ID), HID_BATTERY_QUIRK_IGNORE },
        {}
 };