File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
zephyr/program/lotus/lotus/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -253,12 +253,18 @@ void board_check_current(void)
253253 static int curr_status = EC_DEASSERTED_PROCHOT ;
254254 static int pre_status = EC_DEASSERTED_PROCHOT ;
255255 static int active_port ;
256+ static int pre_active_port ;
256257 static int shunt_register ;
257258
258259 active_port = charge_manager_get_active_charge_port ();
259260
260261 if (active_port == CHARGE_PORT_NONE ) {
261- curr_status = EC_DEASSERTED_PROCHOT ;
262+ if (pre_active_port != active_port ) {
263+ curr_status = EC_DEASSERTED_PROCHOT ;
264+ throttle_ap (THROTTLE_OFF , THROTTLE_HARD , THROTTLE_SRC_AC );
265+
266+ pre_active_port = active_port ;
267+ }
262268 hook_call_deferred (& board_check_current_data , 100 * MSEC );
263269 return ;
264270 }
@@ -291,6 +297,7 @@ void board_check_current(void)
291297 }
292298
293299 pre_status = curr_status ;
300+ pre_active_port = active_port ;
294301}
295302
296303/* EC console command */
You can’t perform that action at this time.
0 commit comments