Skip to content

Commit 6c93dac

Browse files
JosephChen2017rkhuangtao
authored andcommitted
power: rk816-battery: otg switch to dc charger power when init
Without this, otg supply is always provided by PMIC and PMIC can not enter charge mode, because charge or otg supply output is exclusive, only one choice at one time. Change-Id: I4c00392d93abdf55b2b663e8a6a8822249c64d74 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1 parent 72d2f69 commit 6c93dac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/power/rk816_battery.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4089,6 +4089,10 @@ static int rk816_bat_init_charger(struct rk816_battery *di)
40894089

40904090
dc_charger = rk816_bat_init_dc_det(di);
40914091
rk816_bat_set_chrg_param(di, dc_charger);
4092+
if (di->dc_in && di->otg_in && di->pdata->power_dc2otg) {
4093+
BAT_INFO("otg power from dc adapter\n");
4094+
rk816_bat_set_otg_power(di, USB_OTG_POWER_OFF);
4095+
}
40924096

40934097
return 0;
40944098
}

0 commit comments

Comments
 (0)