mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
charging: don't enable term when slave cp disabled
Don't enable main charger termination when slave cp disabled, because main cp also work well, it will load to main charger termination. Change-Id: Idce843eaede60120963efdee92746b3d15c98742 Signed-off-by: Haijian Ma <mahj8@motorola.com> Reviewed-on: https://gerrit.mot.com/2298500 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
f7c69fecb1
commit
542ccbc59a
1 changed files with 5 additions and 3 deletions
|
|
@ -64,9 +64,11 @@ static int cp_enable_charging(struct mmi_charger_device *chrg, bool en)
|
|||
} else
|
||||
chrg->charger_enabled = false;
|
||||
|
||||
rc = mmi_charger_write_iio_chan(chip, MMI_USB_TERMINATION_ENABLED, !chrg->charger_enabled);
|
||||
if(rc)
|
||||
chrg_dev_info(chrg, "%s, enable termination fail\n",__func__);
|
||||
if (!is_cp_slave_pump(chrg)) {
|
||||
rc = mmi_charger_write_iio_chan(chip, MMI_USB_TERMINATION_ENABLED, !chrg->charger_enabled);
|
||||
if(rc)
|
||||
chrg_dev_info(chrg, "%s, enable termination fail\n",__func__);
|
||||
}
|
||||
|
||||
chrg_dev_info(chrg, "%s end, en:%d\n",__func__,en);
|
||||
return rc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue