summaryrefslogtreecommitdiff
path: root/drivers/hid/Kconfig
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-11-24 20:59:37 +0300
committerJiri Kosina <jkosina@suse.cz>2022-12-20 17:30:35 +0300
commita608dc1c06397dc50ab773498433432fb5938f92 (patch)
treeb66a9dc160a4ea233539d501020196a19d27ab55 /drivers/hid/Kconfig
parent2043f9a37d163ef4f572992bec7cdcdf54d965de (diff)
downloadlinux-a608dc1c06397dc50ab773498433432fb5938f92.tar.xz
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 Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/Kconfig')
-rw-r--r--drivers/hid/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 17cce4c50e8d..1aa7b6614c20 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -1264,6 +1264,7 @@ config HID_MCP2221
config HID_KUNIT_TEST
tristate "KUnit tests for HID" if !KUNIT_ALL_TESTS
depends on KUNIT=y
+ depends on HID_BATTERY_STRENGTH
depends on HID_UCLOGIC
default KUNIT_ALL_TESTS
help