aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/hid/wacom_wac.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_wac.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_wac.h')
-rw-r--r--drivers/hid/wacom_wac.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
index 570d29582b82..1824b530bcb5 100644
--- a/drivers/hid/wacom_wac.h
+++ b/drivers/hid/wacom_wac.h
@@ -96,6 +96,8 @@
#define WACOM_DEVICETYPE_WL_MONITOR 0x0008
#define WACOM_DEVICETYPE_DIRECT 0x0010
+#define WACOM_POWER_SUPPLY_STATUS_AUTO -1
+
#define WACOM_HID_UP_WACOMDIGITIZER 0xff0d0000
#define WACOM_HID_SP_PAD 0x00040000
#define WACOM_HID_SP_BUTTON 0x00090000
@@ -297,6 +299,7 @@ struct hid_data {
int last_slot_field;
int num_expected;
int num_received;
+ int bat_status;
int battery_capacity;
int bat_charging;
int bat_connected;