summaryrefslogtreecommitdiff
path: root/common/x86_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/x86_power.c')
-rw-r--r--common/x86_power.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/x86_power.c b/common/x86_power.c
index 4c8183cfe3..e8af63b349 100644
--- a/common/x86_power.c
+++ b/common/x86_power.c
@@ -16,6 +16,7 @@
#include "system.h"
#include "task.h"
#include "timer.h"
+#include "usb_charge.h"
#include "util.h"
#include "x86_power.h"
@@ -329,6 +330,9 @@ void x86_power_task(void)
/* Wait 5ms for SUSCLK to stabilize */
usleep(5000);
+ /* Turn off USB ports. */
+ usb_charge_all_ports_off();
+
state = X86_S5;
break;
@@ -342,6 +346,9 @@ void x86_power_task(void)
gpio_set_level(GPIO_ENABLE_TOUCHPAD, 1);
gpio_set_level(GPIO_TOUCHSCREEN_RESETn, 1);
+ /* Turn on USB ports as we go into S3 or S0. */
+ usb_charge_all_ports_on();
+
state = X86_S3;
break;
@@ -421,6 +428,9 @@ void x86_power_task(void)
/* Turn off power to RAM */
gpio_set_level(GPIO_ENABLE_1_5V_DDR, 0);
+ /* Turn off USB ports. */
+ usb_charge_all_ports_off();
+
state = X86_S5;
break;