From e2a50d2caa289793db3aa2a2e94b00b8a57e352d Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 1 Aug 2017 15:38:01 -0700 Subject: UPSTREAM: HID: input: map digitizer battery usage We already mapped battery strength reports from the generic device control page, but we did not update capacity from input reports, nor we mapped the battery strength report from the digitizer page, so let's implement this now. Batteries driven by the input reports will now start in "unknown" state, and will get updated once we receive first report containing battery strength from the device. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina Bug: 146590412 Signed-off-by: Siarhei Vishniakou Change-Id: I15f2e1c1349e2cf044c45a6697015b95596ce760 Git-commit: 5e88a0aa262f12c609b99571811acdaf19149f65 Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-4.4 Signed-off-by: Swetha Chikkaboraiah --- include/linux/hid.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/hid.h b/include/linux/hid.h index 2a6dc0ab9b88..2f5435653459 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -529,10 +529,12 @@ struct hid_device { /* device report descriptor */ * battery is non-NULL. */ struct power_supply *battery; + __s32 battery_capacity; __s32 battery_min; __s32 battery_max; __s32 battery_report_type; __s32 battery_report_id; + bool battery_reported; #endif unsigned int status; /* see STAT flags above */ -- cgit v1.2.3