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, 3 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 615b96deae..c856e1be70 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -76,8 +76,9 @@ enum charge_state_type charge_state = DISCHARGING;
76#endif 76#endif
77#endif /* CONFIG_CHARGING */ 77#endif /* CONFIG_CHARGING */
78 78
79#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
80static int shutdown_timeout = 0; 79static int shutdown_timeout = 0;
80
81#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
81/* 82/*
82 * Average battery voltage and charger voltage, filtered via a digital 83 * Average battery voltage and charger voltage, filtered via a digital
83 * exponential filter (aka. exponential moving average, scaled): 84 * exponential filter (aka. exponential moving average, scaled):
@@ -755,6 +756,7 @@ void shutdown_hw(void)
755 sleep(HZ/4); 756 sleep(HZ/4);
756 power_off(); 757 power_off();
757} 758}
759#endif /* PLATFORM_NATIVE */
758 760
759void sys_poweroff(void) 761void sys_poweroff(void)
760{ 762{
@@ -794,7 +796,6 @@ void cancel_shutdown(void)
794 796
795 shutdown_timeout = 0; 797 shutdown_timeout = 0;
796} 798}
797#endif /* PLATFORM_NATIVE */
798 799
799/* Send system battery level update events on reaching certain significant 800/* Send system battery level update events on reaching certain significant
800 levels. This must be called after battery_percent has been updated. */ 801 levels. This must be called after battery_percent has been updated. */