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)
582
582
/* put host chipset into reset */
583
583
gpio_set_level (GPIO_SYS_RESET_L , 0 );
584
584
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 ();
598
586
}
599
587
600
588
/* 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)
357
357
}
358
358
359
359
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 ))
361
362
system_power_present = 1 ;
362
363
else
363
364
system_power_present = 0 ;
@@ -368,7 +369,8 @@ int cypd_update_power_status(void)
368
369
int i ;
369
370
int rv = EC_SUCCESS ;
370
371
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 ) {
372
374
power_stat |= BIT (3 );
373
375
}
374
376
if (extpower_is_present ()) {
You can’t perform that action at this time.
0 commit comments