Blob Blame History Raw
From a7758702879e68d221cf6dd9844bf5b2a070c8cb Mon Sep 17 00:00:00 2001
From: Jason Gerecke <killertofu@gmail.com>
Date: Fri, 28 Apr 2017 09:25:32 -0700
Subject: [PATCH] HID: wacom: generic: Report AES battery information
Git-commit: a7758702879e68d221cf6dd9844bf5b2a070c8cb
Patch-mainline: v4.13-rc1
References: bsc#1051510

When support for the HID_DG_BATTERYSTRENGTH usage was added for AES devices,
it appears that the value was read, but never actually forwarded to the
power_supply subystem for userspace's benefit. Let's correct that.

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>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/hid/wacom_wac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 70a9e47b215a..3e034506778f 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -2177,6 +2177,8 @@ static void wacom_wac_pen_report(struct hid_device *hdev,
 		input_sync(input);
 	}
 
+	wacom_wac_pad_battery_report(hdev, report);
+
 	if (!prox) {
 		wacom_wac->tool[0] = 0;
 		wacom_wac->id[0] = 0;
-- 
2.16.4