diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-08-01 15:38:01 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-08-02 10:51:46 +0200 |
commit | 581c4484769e692eade761c17c22549aaefe6749 (patch) | |
tree | 0ad00472eb86320100f7286e7c641b6335535e80 /include/linux/hid.h | |
parent | a9d0683e0b62b46c7a5d0ebd8f642d8f9a4b7b32 (diff) | |
download | blackbird-obmc-linux-581c4484769e692eade761c17c22549aaefe6749.tar.gz blackbird-obmc-linux-581c4484769e692eade761c17c22549aaefe6749.zip |
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>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 5006f9b5d837..281d1ffcbe02 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -542,10 +542,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 */ |