HID: wacom: Add battery presence indicator to wireless tablets
authorJason Gerecke <killertofu@gmail.com>
Wed, 11 Mar 2015 17:25:41 +0000 (10:25 -0700)
committerJiri Kosina <jkosina@suse.cz>
Wed, 11 Mar 2015 17:50:04 +0000 (13:50 -0400)
Declare the POWER_SUPPLY_PROP_PRESENT property to provide userspace
with a way to determine if the battery on a wireless tablet is plugged
in. Although current wireless tablets do not explicitly report this
information, it can be inferred from other state information. In
particular, a battery is assumed to be present if any of the following
are true: a non-zero battery level reported, the battery is reported as
charging, or the tablet is operating wirelessly.

Note: The last condition above may not strictly hold for the Graphire
Wireless (it charges from a DC barrel jack instead of a USB port), but I
do not know what is reported in the no-battery condition.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h

Simple merge
Simple merge
Simple merge