* [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB
@ 2025-10-30 16:06 Mario Limonciello (AMD)
2025-10-31 9:07 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello (AMD) @ 2025-10-30 16:06 UTC (permalink / raw)
To: mario.limonciello, jikos, bentiss
Cc: Mario Limonciello (AMD), Hans de Goede, André Barata,
linux-input
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>
---
drivers/hid/hid-input.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index e56e7de532799..2bbb645c2ff41 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -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 },
{}
};
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB
2025-10-30 16:06 [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB Mario Limonciello (AMD)
@ 2025-10-31 9:07 ` Jiri Kosina
2025-10-31 9:13 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2025-10-31 9:07 UTC (permalink / raw)
To: Mario Limonciello (AMD)
Cc: mario.limonciello, bentiss, Hans de Goede, André Barata,
linux-input
On Thu, 30 Oct 2025, Mario Limonciello (AMD) wrote:
> 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>
Now applied.
We'll have to come up with something more sophisticated once/if Elan ever
starts producing devices with real battery ...
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB
2025-10-31 9:07 ` Jiri Kosina
@ 2025-10-31 9:13 ` Hans de Goede
2025-10-31 14:47 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2025-10-31 9:13 UTC (permalink / raw)
To: Jiri Kosina, Mario Limonciello (AMD), Dmitry Torokhov
Cc: mario.limonciello, bentiss, André Barata, linux-input
Hi Jiri,
On 31-Oct-25 10:07 AM, Jiri Kosina wrote:
> On Thu, 30 Oct 2025, Mario Limonciello (AMD) wrote:
>
>> 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>
>
> Now applied.
>
> We'll have to come up with something more sophisticated once/if Elan ever
> starts producing devices with real battery ...
Actually the provided HID battery is intended to be for
when a stylus is used and to report the stylus battery
values then.
There is an email thread somewhere with some of the ChromeOS folks
talking about dropping the ELAN quirk for I2C touchscreens and
indeed replacing it with something more sophisticated. IIRC
the ChromeOS folks mentioned they would work on / provide patches.
+To: Dmitry, Dmitry do you have any input on the ChromeOs issue ?
In the mean time I do believe these quirks are the lesser of
2 evils. Most people don't have a stylus (which is typically not
bundled with these devices) and even if people have a stylus
not having battery reporting for that is less of a problem then
the false positive low-battery *notifications* which e.g. GNOME
shows due to the battery reporting 0% (rather then not present)
when there is no stylus.
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB
2025-10-31 9:13 ` Hans de Goede
@ 2025-10-31 14:47 ` Dmitry Torokhov
2025-11-06 19:10 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2025-10-31 14:47 UTC (permalink / raw)
To: Hans de Goede
Cc: Jiri Kosina, Mario Limonciello (AMD), mario.limonciello, bentiss,
André Barata, linux-input, Kenneth Albanowski
Hi Hans,
On Fri, Oct 31, 2025 at 2:13 AM Hans de Goede <hansg@kernel.org> wrote:
>
> Hi Jiri,
>
> On 31-Oct-25 10:07 AM, Jiri Kosina wrote:
> > On Thu, 30 Oct 2025, Mario Limonciello (AMD) wrote:
> >
> >> 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>
> >
> > Now applied.
> >
> > We'll have to come up with something more sophisticated once/if Elan ever
> > starts producing devices with real battery ...
>
> Actually the provided HID battery is intended to be for
> when a stylus is used and to report the stylus battery
> values then.
>
> There is an email thread somewhere with some of the ChromeOS folks
> talking about dropping the ELAN quirk for I2C touchscreens and
> indeed replacing it with something more sophisticated. IIRC
> the ChromeOS folks mentioned they would work on / provide patches.
>
> +To: Dmitry, Dmitry do you have any input on the ChromeOs issue ?
+Kenneth Albanowski has been wrangling with support of Elan and other
vendor styli, I'll let him comment.
>
> In the mean time I do believe these quirks are the lesser of
> 2 evils. Most people don't have a stylus (which is typically not
> bundled with these devices) and even if people have a stylus
> not having battery reporting for that is less of a problem then
> the false positive low-battery *notifications* which e.g. GNOME
> shows due to the battery reporting 0% (rather then not present)
> when there is no stylus.
Thanks,
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB
2025-10-31 14:47 ` Dmitry Torokhov
@ 2025-11-06 19:10 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2025-11-06 19:10 UTC (permalink / raw)
To: Hans de Goede
Cc: Jiri Kosina, Mario Limonciello (AMD), mario.limonciello, bentiss,
André Barata, linux-input, Kenneth Albanowski
On Fri, Oct 31, 2025 at 7:47 AM Dmitry Torokhov <dtor@google.com> wrote:
>
> Hi Hans,
>
> On Fri, Oct 31, 2025 at 2:13 AM Hans de Goede <hansg@kernel.org> wrote:
> >
> > Hi Jiri,
> >
> > On 31-Oct-25 10:07 AM, Jiri Kosina wrote:
> > > On Thu, 30 Oct 2025, Mario Limonciello (AMD) wrote:
> > >
> > >> 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>
> > >
> > > Now applied.
> > >
> > > We'll have to come up with something more sophisticated once/if Elan ever
> > > starts producing devices with real battery ...
> >
> > Actually the provided HID battery is intended to be for
> > when a stylus is used and to report the stylus battery
> > values then.
> >
> > There is an email thread somewhere with some of the ChromeOS folks
> > talking about dropping the ELAN quirk for I2C touchscreens and
> > indeed replacing it with something more sophisticated. IIRC
> > the ChromeOS folks mentioned they would work on / provide patches.
> >
> > +To: Dmitry, Dmitry do you have any input on the ChromeOs issue ?
>
> +Kenneth Albanowski has been wrangling with support of Elan and other
> vendor styli, I'll let him comment.
Kenneth is currently busy with some internal projects and asked me to
pass the following:
We recommend that userspace components do not generate alerts for
power supplies that report "status" as "unknown". For a lot of styli
we start with "unknown" and 0 level until after we get a first real
report and update the state to "discharging" or "full" and only hen we
may start showing the indicator.
On ChromeOS we also have tech for clarifying "1%" and other bad
reports, currently specific to USI styluses using a S/N filter.
Kenneth will try to share more details next week hopefully.
Thanks,
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-06 19:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 16:06 [PATCH] HID: hid-input: Extend Elan ignore battery quirk to USB Mario Limonciello (AMD)
2025-10-31 9:07 ` Jiri Kosina
2025-10-31 9:13 ` Hans de Goede
2025-10-31 14:47 ` Dmitry Torokhov
2025-11-06 19:10 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).