mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
power: charger: set under threshold as vddmax_min for unplug_usbcheck_work.
When usb mode is changed from MTP to Tethering, chg_gone_irq_handler is called and then disconnect tethering by turning off ovpfet from unplug_ovp_fet_open. So we add under threshold to protect this error while usb is being connected. Change-Id: Id66a3db0822c291ba348cf93d2e7a72f6ae857ae
This commit is contained in:
parent
4172e74684
commit
e62e15cc2e
1 changed files with 4 additions and 3 deletions
|
@ -2944,10 +2944,11 @@ static void unplug_usbcheck_work(struct work_struct *work)
|
|||
usb_vin = vchg.physical;
|
||||
pr_info("usb_vin : %d, max_voltage_mv=%d\n", usb_vin, chip->max_voltage_mv);
|
||||
|
||||
if (usb_vin/1000 <= chip->max_voltage_mv) {
|
||||
unplug_ovp_fet_open(chip);
|
||||
if ((usb_vin/1000 <= chip->max_voltage_mv) &&
|
||||
(usb_vin/1000 > PM8921_CHG_VDDMAX_MIN)){
|
||||
pr_info(" Turn off USB ovp \n");
|
||||
unplug_ovp_fet_open(chip);
|
||||
}
|
||||
pr_debug(" Notify USB update here \n");
|
||||
power_supply_changed(&chip->batt_psy);
|
||||
power_supply_changed(&chip->usb_psy);
|
||||
power_supply_changed(&chip->dc_psy);
|
||||
|
|
Loading…
Reference in a new issue