diff options
| author | Roderick Colenbrander <[email protected]> | 2020-11-10 07:22:27 +0000 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2020-11-25 12:53:18 +0000 |
| commit | a76a6c1893b0806657cb747c3c8949d3103fbc3f (patch) | |
| tree | cce6088971426fa868810db0a837d7e1dac10c5f /net/switchdev/switchdev.c | |
| parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid... (diff) | |
| download | kernel-a76a6c1893b0806657cb747c3c8949d3103fbc3f.tar.gz kernel-a76a6c1893b0806657cb747c3c8949d3103fbc3f.zip | |
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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
