summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 5c7607413c..1b160af232 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -759,8 +759,11 @@ static void power_thread_sleep(int ticks)
759 * transition to the appropriate steady state charger on/off state. 759 * transition to the appropriate steady state charger on/off state.
760 */ 760 */
761 if(charger_inserted() 761 if(charger_inserted()
762#ifdef HAVE_USB_POWER 762#ifdef HAVE_USB_POWER /* USB powered or USB inserted both provide power */
763 || usb_powered() 763 || usb_powered()
764#ifdef CONFIG_CHARGING
765 || (usb_inserted() && usb_charging_enabled())
766#endif
764#endif 767#endif
765 ) { 768 ) {
766 switch(charger_input_state) { 769 switch(charger_input_state) {