diff options
| author | Hans de Goede <johannes.goede@oss.qualcomm.com> | 2026-02-28 17:52:58 +0300 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-03-11 17:26:47 +0300 |
| commit | 227312b4a65c373d5d8b4683b7fc36203fedc516 (patch) | |
| tree | a73d444b3d2bce2038f8f477c591a0a9ef3b1c19 /include | |
| parent | 487b23afaf4b258a70d3e4a8febf66f09850e75f (diff) | |
| download | linux-227312b4a65c373d5d8b4683b7fc36203fedc516.tar.xz | |
HID: input: Add HID_BATTERY_QUIRK_DYNAMIC for Elan touchscreens
Elan touchscreens have a HID-battery device for the stylus which is always
there even if there is no stylus.
This is causing upower to report an empty battery for the stylus and some
desktop-environments will show a notification about this, which is quite
annoying.
Because of this the HID-battery is being ignored on all Elan I2c and USB
touchscreens, but this causes there to be no battery reporting for
the stylus at all.
This adds a new HID_BATTERY_QUIRK_DYNAMIC and uses these for the Elan
touchscreens.
This new quirks causes the present value of the battery to start at 0,
which will make userspace ignore it and only sets present to 1 after
receiving a battery input report which only happens when the stylus
gets in range.
Reported-by: ggrundik@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221118
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/hid.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 2990b9f94cb5..31324609af4d 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -682,6 +682,7 @@ struct hid_device { __s32 battery_charge_status; enum hid_battery_status battery_status; bool battery_avoid_query; + bool battery_present; ktime_t battery_ratelimit_time; #endif |
