<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hid/hid-input.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-01-02T11:56:55+00:00</updated>
<entry>
<title>HID: input: map HID_GD_Z to ABS_DISTANCE for stylus/pen</title>
<updated>2026-01-02T11:56:55+00:00</updated>
<author>
<name>Ping Cheng</name>
<email>pinglinux@gmail.com</email>
</author>
<published>2025-10-27T20:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14b1a6009e488db77c454f1286292643532b6585'/>
<id>urn:sha1:14b1a6009e488db77c454f1286292643532b6585</id>
<content type='text'>
commit 7953794f741e94d30df9dafaaa4c031c85b891d6 upstream.

HID_GD_Z is mapped to ABS_Z for stylus and pen in hid-input.c. But HID_GD_Z
should be used to report ABS_DISTANCE for stylus and pen as described at:
Documentation/input/event-codes.rst#n226

* ABS_DISTANCE:

  - Used to describe the distance of a tool from an interaction surface. This
    event should only be emitted while the tool is hovering, meaning in close
    proximity of the device and while the value of the BTN_TOUCH code is 0. If
    the input device may be used freely in three dimensions, consider ABS_Z
    instead.
  - BTN_TOOL_&lt;name&gt; should be set to 1 when the tool comes into detectable
    proximity and set to 0 when the tool leaves detectable proximity.
    BTN_TOOL_&lt;name&gt; signals the type of tool that is currently detected by the
    hardware and is otherwise independent of ABS_DISTANCE and/or BTN_TOUCH.

This patch makes the correct mapping. The ABS_DISTANCE is currently not mapped
by any HID usage in hid-generic driver.

Signed-off-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>HID: hid-input: Extend Elan ignore battery quirk to USB</title>
<updated>2025-10-31T09:06:36+00:00</updated>
<author>
<name>Mario Limonciello (AMD)</name>
<email>superm1@kernel.org</email>
</author>
<published>2025-10-30T16:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=534ca75e8e3b713514b3f2da85dab96831cf5b2a'/>
<id>urn:sha1:534ca75e8e3b713514b3f2da85dab96831cf5b2a</id>
<content type='text'>
USB Elan devices have the same problem as the I2C ones with a fake
battery device showing up.

Reviewed-by: Hans de Goede &lt;hansg@kernel.org&gt;
Reported-by: André Barata &lt;andretiagob@protonmail.com&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220722
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: hid-input: only ignore 0 battery events for digitizers</title>
<updated>2025-10-15T15:14:39+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2025-10-15T04:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0187c08058da3e7f11b356ac27e0c427d36f33f2'/>
<id>urn:sha1:0187c08058da3e7f11b356ac27e0c427d36f33f2</id>
<content type='text'>
Commit 581c4484769e ("HID: input: map digitizer battery usage") added
handling of battery events for digitizers (typically for batteries
presented in stylii). Digitizers typically report correct battery levels
only when stylus is actively touching the surface, and in other cases
they may report battery level of 0. To avoid confusing consumers of the
battery information the code was added to filer out reports with 0
battery levels.

However there exist other kinds of devices that may legitimately report
0 battery levels. Fix this by filtering out 0-level reports only for
digitizer usages, and continue reporting them for other kinds of devices
(Smart Batteries, etc).

Reported-by: 卢国宏 &lt;luguohong@xiaomi.com&gt;
Fixes: 581c4484769e ("HID: input: map digitizer battery usage")
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: input: calculate resolution for pressure</title>
<updated>2025-09-15T12:32:54+00:00</updated>
<author>
<name>Angela Czubak</name>
<email>aczubak@google.com</email>
</author>
<published>2025-08-18T23:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7657bf0b7cfb63ded95a6fe4e1cf106cf386b6cc'/>
<id>urn:sha1:7657bf0b7cfb63ded95a6fe4e1cf106cf386b6cc</id>
<content type='text'>
Assume that if the pressure is given in newtons it should be normalized
to grams. If the pressure has no unit do not calculate resolution.

Signed-off-by: Angela Czubak &lt;aczubak@google.com&gt;
Co-developed-by: Jonathan Denose &lt;jdenose@google.com&gt;
Signed-off-by: Jonathan Denose &lt;jdenose@google.com&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: input: allow mapping of haptic output</title>
<updated>2025-09-15T12:32:54+00:00</updated>
<author>
<name>Angela Czubak</name>
<email>aczubak@google.com</email>
</author>
<published>2025-08-18T23:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a56e7b211e5b6e78cd87786ea4c5a62231d1da2'/>
<id>urn:sha1:7a56e7b211e5b6e78cd87786ea4c5a62231d1da2</id>
<content type='text'>
This change makes it possible to parse output reports by input mapping
functions by HID drivers.

Signed-off-by: Angela Czubak &lt;aczubak@google.com&gt;
Co-developed-by: Jonathan Denose &lt;jdenose@google.com&gt;
Signed-off-by: Jonathan Denose &lt;jdenose@google.com&gt;
Reviewed-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: input: report battery status changes immediately</title>
<updated>2025-08-20T18:03:39+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2025-08-14T10:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e94536e1d1818b0989aa19b443b7089f50133c35'/>
<id>urn:sha1:e94536e1d1818b0989aa19b443b7089f50133c35</id>
<content type='text'>
Previously, the battery status (charging/discharging) was not reported
immediately to user-space. 

For most input devices, this wasn't problematic because changing their
battery status requires connecting them to a different bus.
For example, a gamepad would report a discharging status while
connected via Bluetooth and a charging status while connected via USB.

However, certain devices are not connected or disconnected when their
battery status changes. For example, a phone battery changes its status
without connecting or disconnecting it.
In these cases, the battery status was not reported immediately to user
space.

Report battery status changes immediately to user space to support
these kinds of devices.

Fixes: a608dc1c0639 ("HID: input: map battery system charging")
Reported-by: 卢国宏 &lt;luguohong@xiaomi.com&gt;
Closes: https://lore.kernel.org/linux-input/aI49Im0sGb6fpgc8@fedora/T/
Tested-by: 卢国宏 &lt;luguohong@xiaomi.com&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: input: rename hidinput_set_battery_charge_status()</title>
<updated>2025-08-20T18:03:39+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2025-08-14T10:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a82231b2a8712d0218fc286a9b0da328d419a3f4'/>
<id>urn:sha1:a82231b2a8712d0218fc286a9b0da328d419a3f4</id>
<content type='text'>
In preparation for a patch fixing a bug affecting
hidinput_set_battery_charge_status(), rename the function to
hidinput_update_battery_charge_status() and move it up so it can be used
by hidinput_update_battery().

Refactor, no functional changes.

Tested-by: 卢国宏 &lt;luguohong@xiaomi.com&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: input: lower message severity of 'No inputs registered, leaving' to debug</title>
<updated>2025-06-10T19:47:48+00:00</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2025-05-23T16:10:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa10d4515817274a50af510d5d283d3c7fffc1ae'/>
<id>urn:sha1:fa10d4515817274a50af510d5d283d3c7fffc1ae</id>
<content type='text'>
Plugging in a "Blue snowball" microphone always shows the
error 'No inputs registered, leaving', but the device functions as
intended.

When a HID device is started using the function hid_hw_start() and
the argument HID_CONNECT_DEFAULT it will try all various hid connect
requests. Not all devices will create an input device and so the
message is needlessly noisy.  Decrease it to debug instead.

[jkosina@suse.com: edit shortlog]
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: fix generic desktop D-Pad controls</title>
<updated>2025-01-09T09:06:14+00:00</updated>
<author>
<name>Terry Tritton</name>
<email>terry.tritton@linaro.org</email>
</author>
<published>2024-12-20T19:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80818fdc068eaab729bb793d790ae9fd053f7053'/>
<id>urn:sha1:80818fdc068eaab729bb793d790ae9fd053f7053</id>
<content type='text'>
The addition of the "System Do Not Disturb" event code caused the Generic
Desktop D-Pad configuration to be skipped. This commit allows both to be
configured without conflicting with each other.

Fixes: 22d6d060ac77 ("input: Add support for "Do Not Disturb"")
Signed-off-by: Terry Tritton &lt;terry.tritton@linaro.org&gt;
Reviewed-by: Aseda Aboagye &lt;aaboagye@chromium.org&gt;
Reviewed-by: Carlos Llamas &lt;cmllamas@google.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: Ignore battery for all ELAN I2C-HID devices</title>
<updated>2024-08-06T06:42:53+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2024-08-05T14:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcc31692a1d1e21f0d06c5f727c03ee299d2264e'/>
<id>urn:sha1:bcc31692a1d1e21f0d06c5f727c03ee299d2264e</id>
<content type='text'>
Before this change there were 16 vid:pid based quirks to ignore the battery
reported by Elan I2C-HID touchscreens on various Asus and HP laptops.

And a report has been received that the 04F3:2A00 I2C touchscreen on
the HP ProBook x360 11 G5 EE/86CF also reports a non present battery.

Since I2C-HID devices are always builtin to laptops they are not battery
owered so it should be safe to just ignore the battery on all Elan I2C-HID
devices, rather then adding a 17th quirk for the 04F3:2A00 touchscreen.

As reported in the changelog of commit a3a5a37efba1 ("HID: Ignore battery
for ELAN touchscreens 2F2C and 4116"), which added 2 new Elan touchscreen
quirks about a month ago, the HID reported battery seems to be related
to a stylus being used. But even when a stylus is in use it does not
properly report the charge of the stylus battery, instead the reported
battery charge jumps from 0% to 1%. So it is best to just ignore the
HID battery.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2302776
Cc: Louis Dalibard &lt;ontake@ontake.dev&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
</feed>
