diff options
author | Roderick Colenbrander <roderick.colenbrander@sony.com> | 2020-11-10 10:22:27 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2020-11-25 15:53:18 +0300 |
commit | a76a6c1893b0806657cb747c3c8949d3103fbc3f (patch) | |
tree | cce6088971426fa868810db0a837d7e1dac10c5f /drivers/vme | |
parent | d5530d82efc8631beff20480b1168b1c44294fe1 (diff) | |
download | linux-a76a6c1893b0806657cb747c3c8949d3103fbc3f.tar.xz |
HID: sony: Report more accurate DS4 power status.
This patch moves the power supply status logic to DS3/DS4 parse_report,
to allow for more accurate DS4 status reporting.
The DS4 power status code was actually incorrect, but reported okay'ish
data in most cases. There was a different interpretation of the battery_info
values 0-10 or 0-9 depending on cable state. It added +1 to extend the range
to 0-10. This is actually incorrect, there is no different range. Values
higher than 11 actually indicates 'full' and 14/15 'error' for which we
reported 100% and a valid power state.
Moving the status logic to parse_report avoids having to pass more state
to the generic sony_battery_get_property and simplifies the code.
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/vme')
0 files changed, 0 insertions, 0 deletions