Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
power: smb5: report fast charging when a proprietary charger is attached
Android figures out if charging is "rapid" by checking POWER_SUPPLY_PROP_CURRENT_MAX and when the proprietary charger tech Xiaomi's using is active that value isn't always reported correctly. Work around that by reporting an arbitrary value that's high enough to qualify as "rapid" when a proprietary charger is attached and fully authenticated (by checking smblib_get_fastcharge_mode() which is a custom utility function added by Xiaomi). Other charger types (HVDCP/PD) still use standard smblib_get_prop_input_current_max(). Test: original 33W charger is reported as "rapid" immediately after plugging it in, a slow charger is still detected as "slow". Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com> Change-Id: I84d1eaa8a0cd4b3c4406725e75abcf29bad546b2 Signed-off-by: Forenche <prahul2003@gmail.com>
- Loading branch information