HID: logitech-hidpp: battery: provide CAPACITY_LEVEL
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 27 Mar 2017 14:59:36 +0000 (16:59 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Apr 2017 12:36:39 +0000 (14:36 +0200)
commit5b036ea18e13e006e99cb197e9aceb09d897d20a
tree0bc7406942824db5f2c05e45dcdcbc15f393328d
parent14f437a1d7b49a2e873f63436526f9aed3a781c3
HID: logitech-hidpp: battery: provide CAPACITY_LEVEL

CAPACITY LEVEL allows to forward rough information on the battery mileage.
HID++ 2.0 devices will either report percentage or levels, so better
forwarding this information to the user space.

The M325 supports only 2 levels: 'Full' and 'Critical'. With mileage,
it will report either 90% or 5%, which might confuse users. With this
change the battery will either report "Full" or "Critical".

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c