imx233: enable charging in bootloader USB mode by including powermgmt

Change-Id: I8b91b3ab60cb9ffaa127333e9bcef8c33be742fa
This commit is contained in:
Amaury Pouly 2012-03-15 14:58:15 +01:00
parent 5edae54e0d
commit a4fd5bf7cb
3 changed files with 18 additions and 3 deletions

View file

@ -1335,9 +1335,9 @@ target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c
#ifndef BOOTLOADER
target/arm/imx233/sansa-fuzeplus/audio-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c
#endif
#endif

View file

@ -889,9 +889,9 @@ void set_keypress_restarts_sleep_timer(bool enable)
sleeptimer_key_restarts = enable;
}
#ifndef BOOTLOADER
static void handle_sleep_timer(void)
{
#ifndef BOOTLOADER
if (!sleeptimer_active)
return;
@ -912,8 +912,8 @@ static void handle_sleep_timer(void)
sys_poweroff();
}
}
#endif /* BOOTLOADER */
}
#endif /* BOOTLOADER */
/*
* We shut off in the following cases:
@ -929,6 +929,7 @@ static void handle_sleep_timer(void)
*/
void handle_auto_poweroff(void)
{
#ifndef BOOTLOADER
long timeout = poweroff_timeout*60*HZ;
int audio_stat = audio_status();
long tick = current_tick;
@ -968,4 +969,5 @@ void handle_auto_poweroff(void)
}
} else
handle_sleep_timer();
#endif
}