mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
59aa39697f
commit a608dc1c06
upstream.
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
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 lines
120 B
Plaintext
7 lines
120 B
Plaintext
CONFIG_KUNIT=y
|
|
CONFIG_USB=y
|
|
CONFIG_USB_HID=y
|
|
CONFIG_HID_BATTERY_STRENGTH=y
|
|
CONFIG_HID_UCLOGIC=y
|
|
CONFIG_HID_KUNIT_TEST=y
|