HID: wacom: generic: Ignore HID_DG_BATTERYSTRENTH == 0
authorJason Gerecke <killertofu@gmail.com>
Fri, 28 Apr 2017 16:25:31 +0000 (09:25 -0700)
committerJiri Kosina <jkosina@suse.cz>
Fri, 5 May 2017 19:46:09 +0000 (21:46 +0200)
commitf496c09c0785b60fa6b762ad720ba31f6a9de0ac
tree6797883f5d56901b50f5f4a9ea723534e3698dd4
parent37d1601938349e79e9c31a8aba431d5543e09e72
HID: wacom: generic: Ignore HID_DG_BATTERYSTRENTH == 0

AES sensors use the value 0 to indicate "not available" rather than
"completely dead". Such values are often sent for dozens of reports
while the pen is being brought into proximity and can cause userspace
to get the wrong impression about the actual battery state.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c