diff options
Diffstat (limited to 'common/x86_power.c')
-rw-r--r-- | common/x86_power.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/x86_power.c b/common/x86_power.c index 7b8b492067..4d9f5bbcfe 100644 --- a/common/x86_power.c +++ b/common/x86_power.c @@ -11,7 +11,7 @@ #include "gpio.h" #include "hooks.h" #include "host_command.h" -#include "power_button.h" +#include "switch.h" #include "system.h" #include "task.h" #include "timer.h" @@ -333,7 +333,7 @@ DECLARE_HOOK(HOOK_LID_CHANGE, x86_lid_change, HOOK_PRIO_DEFAULT); static void x86_power_ac_change(void) { - if (power_ac_present()) { + if (switch_get_ac_present()) { CPRINTF("[%T x86 AC on]\n"); } else { CPRINTF("[%T x86 AC off]\n"); @@ -431,7 +431,7 @@ void x86_power_task(void) } in_want = 0; - if (power_ac_present()) + if (switch_get_ac_present()) task_wait_event(-1); else { uint64_t target_time = last_shutdown_time + @@ -477,7 +477,7 @@ void x86_power_task(void) * of reset so it can wake the processor. */ gpio_set_level(GPIO_TOUCHSCREEN_RESETn, - power_lid_open_debounced()); + switch_get_lid_open()); /* Check for state transitions */ if (gpio_get_level(GPIO_PCH_SLP_S3n) == 1) { @@ -749,7 +749,7 @@ static int command_hibernation_delay(int argc, char **argv) /* Print the current setting */ ccprintf("Hibernation delay: %d s\n", hibernate_delay); - if (state == X86_G3 && !power_ac_present()) { + if (state == X86_G3 && !switch_get_ac_present()) { ccprintf("Time G3: %d s\n", time_g3); ccprintf("Time left: %d s\n", hibernate_delay - time_g3); } |