UPSTREAM: HID: input: map battery system charging
HID descriptors with Battery System (0x85) Charging (0x44) usage are ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user space, even when the device is charging. Map this usage and when it is reported set the right charging status. In addition, add KUnit tests to make sure that the charging status is correctly set and reported. They can be run with the usual command: $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid Change-Id: Ib42e823c5fccfe0c281d8855e124c03b20978132 Signed-off-by:José Expósito <jose.exposito89@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz> (cherry picked from commit a608dc1c) Bug: 305125317 Cc: Lu Guohong <luguohong@xiaomi.corp-partner.google.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@google.com>
Loading
Please register or sign in to comment