pm: stats: pm_(start|stop)_timer -> pm_stats_(start|stop)
Improve the naming of the start/stop functions. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
7baed3dd3e
commit
e6b884982f
3 changed files with 8 additions and 8 deletions
|
@ -52,12 +52,12 @@ static int pm_stats_init(const struct device *unused)
|
||||||
|
|
||||||
SYS_INIT(pm_stats_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
SYS_INIT(pm_stats_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||||
|
|
||||||
void pm_start_timer(void)
|
void pm_stats_start(void)
|
||||||
{
|
{
|
||||||
pm_cpu_timings[_current_cpu->id].timer_start = k_cycle_get_32();
|
pm_cpu_timings[_current_cpu->id].timer_start = k_cycle_get_32();
|
||||||
}
|
}
|
||||||
|
|
||||||
void pm_stop_timer(void)
|
void pm_stats_stop(void)
|
||||||
{
|
{
|
||||||
pm_cpu_timings[_current_cpu->id].timer_end = k_cycle_get_32();
|
pm_cpu_timings[_current_cpu->id].timer_end = k_cycle_get_32();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
#include <pm/state.h>
|
#include <pm/state.h>
|
||||||
|
|
||||||
#ifdef CONFIG_PM_STATS
|
#ifdef CONFIG_PM_STATS
|
||||||
void pm_start_timer(void);
|
void pm_stats_start(void);
|
||||||
void pm_stop_timer(void);
|
void pm_stats_stop(void);
|
||||||
void pm_stats_update(enum pm_state state);
|
void pm_stats_update(enum pm_state state);
|
||||||
#else
|
#else
|
||||||
static inline void pm_start_timer(void) {}
|
static inline void pm_stats_start(void) {}
|
||||||
static inline void pm_stop_timer(void) {}
|
static inline void pm_stats_stop(void) {}
|
||||||
static inline void pm_stats_update(enum pm_state state) {}
|
static inline void pm_stats_update(enum pm_state state) {}
|
||||||
#endif /* CONFIG_PM_STATS */
|
#endif /* CONFIG_PM_STATS */
|
||||||
|
|
||||||
|
|
|
@ -253,11 +253,11 @@ bool pm_system_suspend(int32_t ticks)
|
||||||
* sent the notification in pm_system_resume().
|
* sent the notification in pm_system_resume().
|
||||||
*/
|
*/
|
||||||
k_sched_lock();
|
k_sched_lock();
|
||||||
pm_start_timer();
|
pm_stats_start();
|
||||||
/* Enter power state */
|
/* Enter power state */
|
||||||
pm_state_notify(true);
|
pm_state_notify(true);
|
||||||
pm_state_set(z_power_states[id]);
|
pm_state_set(z_power_states[id]);
|
||||||
pm_stop_timer();
|
pm_stats_stop();
|
||||||
|
|
||||||
/* Wake up sequence starts here */
|
/* Wake up sequence starts here */
|
||||||
#if CONFIG_PM_DEVICE
|
#if CONFIG_PM_DEVICE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue