diff options
author | Chris Bagwell <chris@cnpbagwell.com> | 2012-03-26 10:26:30 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-26 10:33:17 +0400 |
commit | a1d552cc15b0be9124ccba593f99f59c4ec1e153 (patch) | |
tree | bae307464abfba32dfc3a4c19bbe38c1106746fe /drivers/input/tablet/wacom_wac.c | |
parent | 16bf288c4be67b68c3fcb6561ff145702cb7bd22 (diff) | |
download | linux-a1d552cc15b0be9124ccba593f99f59c4ec1e153.tar.xz |
Input: wacom - wireless battery status
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_wac.c')
-rw-r--r-- | drivers/input/tablet/wacom_wac.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index fce7a09fb5db..99fb6fed2bf3 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -1054,17 +1054,20 @@ static int wacom_wireless_irq(struct wacom_wac *wacom, size_t len) connected = data[1] & 0x01; if (connected) { - int pid; + int pid, battery; pid = get_unaligned_be16(&data[6]); + battery = data[5] & 0x3f; if (wacom->pid != pid) { wacom->pid = pid; wacom_schedule_work(wacom); } + wacom->battery_capacity = battery; } else if (wacom->pid != 0) { /* disconnected while previously connected */ wacom->pid = 0; wacom_schedule_work(wacom); + wacom->battery_capacity = 0; } return 0; |