Skip to content

Commit 5f42826

Browse files
committed
[fix] ec should not control C_CTRL when no battery
when there is no battery, ec should not issue C_CTRL cmd to PDFW. PDFW will control power source: Port priorlity of pdfw: p2>p3>p1>p0. Signed-off-by: elmo_lan <hplan1112@gmail.com>
1 parent 2f64e29 commit 5f42826

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

board/hx30/cypress5525.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,9 @@ int board_set_active_charge_port(int charge_port)
17661766
{
17671767
CPRINTS("start change port = %d, prev_charge_port = %d", charge_port, prev_charge_port);
17681768

1769+
if (board_batt_is_present() != BP_YES)
1770+
return EC_ERROR_NOT_POWERED;
1771+
17691772
/* port need change, stop all power and ready to switch. */
17701773
if (prev_charge_port != -1 && prev_charge_port != charge_port) {
17711774
update_soc_power_limit(false, true);

0 commit comments

Comments
 (0)