summaryrefslogtreecommitdiffstats
path: root/drivers/hid/Kconfig
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2011-11-23 00:49:14 -0800
committerJiri Kosina <jkosina@suse.cz>2011-11-28 11:10:22 +0100
commit4f5ca836bef3dd3eb602152d5d712a513998264e (patch)
tree37c1c2ba43fdcadac3e7627b57999ebb0c71bee4 /drivers/hid/Kconfig
parenta2b2c20ba2f6e22c065f401d63f7f883779cf642 (diff)
downloadtalos-obmc-linux-4f5ca836bef3dd3eb602152d5d712a513998264e.tar.gz
talos-obmc-linux-4f5ca836bef3dd3eb602152d5d712a513998264e.zip
HID: hid-input: add support for HID devices reporting Battery Strength
Some HID devices, such as my Bluetooth mouse, report their battery strength as an event. Rather than passing it through as a strange absolute input event, this patch registers it with the power_supply subsystem as a battery, so that the device's Battery Strength can be reported to usermode. The battery appears in sysfs names /sys/class/power_supply/hid-<UNIQ>-battery, and it is a child of the battery-containing device, so it should be clear what it's the battery of. Unfortunately on my current Fedora 16 system, while the battery does appear in the UI, it is listed as a Laptop Battery with 0% charge (since it ignores the "capacity" property of the battery and instead computes it from the "energy*" fields, which we can't supply given the limited information contained within the HID Report). Still, this patch is the first step. Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/Kconfig')
-rw-r--r--drivers/hid/Kconfig5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 22a4a051f221..3a97f1fab243 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -31,6 +31,11 @@ config HID
If unsure, say Y.
+config HID_BATTERY_STRENGTH
+ bool
+ depends on POWER_SUPPLY
+ default y
+
config HIDRAW
bool "/dev/hidraw raw HID device support"
depends on HID
OpenPOWER on IntegriCloud