pm: Change pm_power_state_next_get to support SMP
Change the API to account multiple CPUs. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
af2def14d8
commit
8c3d9afed7
2 changed files with 5 additions and 4 deletions
|
@ -178,9 +178,10 @@ void pm_power_state_set(struct pm_state_info info);
|
|||
* This function returns the next power state that will be used by the
|
||||
* SoC.
|
||||
*
|
||||
* @param cpu CPU index.
|
||||
* @return next pm_state_info that will be used
|
||||
*/
|
||||
const struct pm_state_info pm_power_state_next_get(void);
|
||||
const struct pm_state_info pm_power_state_next_get(uint8_t cpu);
|
||||
|
||||
/**
|
||||
* @brief Do any SoC or architecture specific post ops after sleep state exits.
|
||||
|
@ -209,7 +210,7 @@ void pm_power_state_exit_post_ops(struct pm_state_info info);
|
|||
|
||||
#define pm_power_state_set(info)
|
||||
#define pm_power_state_exit_post_ops(info)
|
||||
#define pm_power_state_next_get() \
|
||||
#define pm_power_state_next_get(cpu) \
|
||||
((struct pm_state_info){PM_STATE_ACTIVE, 0, 0})
|
||||
|
||||
#endif /* CONFIG_PM */
|
||||
|
|
|
@ -365,7 +365,7 @@ int pm_notifier_unregister(struct pm_notifier *notifier)
|
|||
return ret;
|
||||
}
|
||||
|
||||
const struct pm_state_info pm_power_state_next_get(void)
|
||||
const struct pm_state_info pm_power_state_next_get(uint8_t cpu)
|
||||
{
|
||||
return z_power_states[_current_cpu->id];
|
||||
return z_power_states[cpu];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue