diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-03-06 20:47:43 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-03-11 16:46:13 +0100 |
commit | b0882cb79dbd2bbdfac1416f8474aa6b0adb9334 (patch) | |
tree | 2c1b06e9549ae352a2b4925375383545dfdf7307 /drivers/hid/wacom_sys.c | |
parent | HID: wacom: Report battery status for Intuos Pro and Intuos5 (diff) | |
download | linux-b0882cb79dbd2bbdfac1416f8474aa6b0adb9334.tar.xz linux-b0882cb79dbd2bbdfac1416f8474aa6b0adb9334.zip |
HID: wacom: Status packet provides 'charging', not 'powered' bit
The status packet for tablets which can use a wireless module contains a
bit that is set if the battery is charging. This bit will be 0 if either
a battery is not present or if the battery has reached full charge. Note
that the charging circuit may continue to charge the battery for a short
time after reaching "100%".
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index dfa4be7eac8c..955ce7ceda89 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -977,6 +977,8 @@ static int wacom_battery_get_property(struct power_supply *psy, else if (wacom->wacom_wac.battery_capacity == 100 && wacom->wacom_wac.ps_connected) val->intval = POWER_SUPPLY_STATUS_FULL; + else if (wacom->wacom_wac.ps_connected) + val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; else val->intval = POWER_SUPPLY_STATUS_DISCHARGING; break; |