mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
power: supply: qti_battery_charger: Fix charging_enabled node disabled state
The previous logic was flawed, since it was limiting charge to 1A when charging control was disabled. Default to thermal limit to mimic what restrict_chg node does. Change-Id: I18fb4f18ade276b561171f3217ddafa0e48a4555
This commit is contained in:
parent
801da2ad39
commit
4a527b3703
1 changed files with 3 additions and 3 deletions
|
|
@ -1801,13 +1801,13 @@ static ssize_t charging_enabled_store(struct class *c,
|
|||
if (val) {
|
||||
/*
|
||||
* Enable charging, i.e. set the restricted current back to
|
||||
* its default value and unset the restriction boolean flag.
|
||||
* the thermal limit and unset the restriction boolean flag.
|
||||
*/
|
||||
rc = __battery_psy_set_charge_current(bcdev,
|
||||
DEFAULT_RESTRICT_FCC_UA);
|
||||
bcdev->thermal_fcc_ua);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
bcdev->restrict_fcc_ua = DEFAULT_RESTRICT_FCC_UA;
|
||||
bcdev->restrict_fcc_ua = bcdev->thermal_fcc_ua;
|
||||
bcdev->restrict_chg_en = 0;
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue