summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-08-01 15:38:01 -0700
committerAlistair Delva <adelva@google.com>2020-01-02 19:20:03 +0000
commit1529f5b870a49e774851f5b7ed9d0aba823b1c73 (patch)
tree8d125c6910364212bbe314af3a0e0caea6979abe /include
parent6c44f29eb346a68877d5f8d2c183abf626d16594 (diff)
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 <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Bug: 146590412 Change-Id: I15f2e1c1349e2cf044c45a6697015b95596ce760 (cherry picked from commit 581c4484769e692eade761c17c22549aaefe6749) Signed-off-by: Siarhei Vishniakou <svv@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 2cdcf713ef51..95a428fe8956 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -522,10 +522,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 */