File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -582,19 +582,7 @@ void board_hibernate_late(void)
582582 /* put host chipset into reset */
583583 gpio_set_level (GPIO_SYS_RESET_L , 0 );
584584
585- /* Turn off LEDs in hibernate */
586- /*
587- gpio_set_level(GPIO_CHARGE_LED_1, 0);
588- gpio_set_level(GPIO_CHARGE_LED_2, 0);
589- */
590-
591- /*
592- * Set PD wake low so that it toggles high to generate a wake
593- * event once we leave hibernate.
594- */
595- /*
596- gpio_set_level(GPIO_USB_PD_WAKE, 0);
597- */
585+ board_power_off_deferred ();
598586}
599587
600588/* according to Panel team suggest, delay 60ms to meet spec */
Original file line number Diff line number Diff line change @@ -357,7 +357,8 @@ void cypd_update_power(void)
357357 }
358358
359359 if (extpower_is_present () ||
360- charger_current_battery_params ()-> flags & BATT_FLAG_RESPONSIVE )
360+ (charger_current_battery_params ()-> flags & BATT_FLAG_RESPONSIVE &&
361+ charger_current_battery_params ()-> state_of_charge > 0 ))
361362 system_power_present = 1 ;
362363 else
363364 system_power_present = 0 ;
@@ -368,7 +369,8 @@ int cypd_update_power_status(void)
368369 int i ;
369370 int rv = EC_SUCCESS ;
370371 int power_stat = 0 ;
371- if (charger_current_battery_params ()-> flags & BATT_FLAG_RESPONSIVE ) {
372+ if (charger_current_battery_params ()-> flags & BATT_FLAG_RESPONSIVE &&
373+ charger_current_battery_params ()-> state_of_charge > 0 ) {
372374 power_stat |= BIT (3 );
373375 }
374376 if (extpower_is_present ()) {
You can’t perform that action at this time.
0 commit comments