aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2017-04-28 09:25:33 -0700
committerJiri Kosina <jkosina@suse.cz>2017-05-05 21:46:10 +0200
commit16e4598905a9d7793350ffad2f627b3dfdb7b595 (patch)
tree6ca0b77aa2c2c093376cd163ec2fe57c34d96372 /drivers/hid/wacom.h
parentHID: wacom: generic: Report AES battery information (diff)
downloadwireguard-linux-16e4598905a9d7793350ffad2f627b3dfdb7b595.tar.xz
wireguard-linux-16e4598905a9d7793350ffad2f627b3dfdb7b595.zip
HID: wacom: Add ability to provide explicit battery status info
At the moment, our driver relies on 'wacom_battery_get_property()' to determine the most likely battery state (e.g charging, discharging, or full) based on the information available. It is not always possible for the function to properly determine this, however. For instance, whenever an AES pen leaves proximity the battery state becomes indeterminite. This commit adds the ability to provide it with explict state information if desired. Whenever explicit state is not required (the majority of circumstances), WACOM_POWER_SUPPLY_STATUS_AUTO can be used in its place. Three uses of explicit battery status are added: two wireless disconnect paths and the AES case mentioned above. 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>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index c7b9ab1907d8..3c37c3cbf6f1 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -138,6 +138,7 @@ struct wacom_battery {
struct power_supply_desc bat_desc;
struct power_supply *battery;
char bat_name[WACOM_NAME_MAX];
+ int bat_status;
int battery_capacity;
int bat_charging;
int bat_connected;