FROMGIT: HID: input: report battery status changes immediately
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: a608dc1c ("HID: input: map battery system charging") Reported-by:卢国宏 <luguohong@xiaomi.com> Closes: https://lore.kernel.org/linux-input/aI49Im0sGb6fpgc8@fedora/T/ Tested-by:
卢国宏 <luguohong@xiaomi.com> Signed-off-by:
José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.com> Bug: 435360874 Bug: 440948104 (cherry picked from commit e94536e1 https://web.git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git for-6.17/upstream-fixes) Change-Id: If14c937a34c07d5d1fdda6bc203a03c33102e457 Signed-off-by:
Guohong Lu <luguohong@xiaomi.corp-partner.google.com> (cherry picked from commit 8aaaf75e)
Loading
Please sign in to comment