summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-07-25 17:29:48 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-25 18:55:53 -0700
commitac8d10101b0e3a0a1478f8bb51bbbb0a56fe0956 (patch)
treeb0c3b337484358d079bcf13e9d9e754cc71bd5bd /drivers/hid/wacom.h
parentc757cbafd6afe8e47d12320aa05edcd1b1d97186 (diff)
downloadblackbird-op-linux-ac8d10101b0e3a0a1478f8bb51bbbb0a56fe0956.tar.gz
blackbird-op-linux-ac8d10101b0e3a0a1478f8bb51bbbb0a56fe0956.zip
Input: wacom - enhance Wireless Receiver battery reporting
- Reports the current status of the battery (discharging, charging, full). - Also notify the upower daemon when there is a change in the battery value. - keep the battery value as a percentage, not the raw value - add WACOM_QUIRK_BATTERY to easily add a battery to a device (required for Bluetooth devices) Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Przemo Firszt <przemo@firszt.eu> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index a678f827e39e..98cb93f16ba4 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -128,6 +128,13 @@ static inline void wacom_schedule_work(struct wacom_wac *wacom_wac)
schedule_work(&wacom->work);
}
+static inline void wacom_notify_battery(struct wacom_wac *wacom_wac)
+{
+ struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
+
+ power_supply_changed(&wacom->battery);
+}
+
extern const struct hid_device_id wacom_ids[];
void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len);
OpenPOWER on IntegriCloud