Skip to content
Commit 5c5172dd authored by Flavio Ceolin's avatar Flavio Ceolin Committed by Anas Nashif
Browse files

power: Effectively allow forcing a state



pm_power_state_force had two different behavior, if
CONFIG_PM_DIRECT_FORCE_MODE was enabled this function immediately
calls pm_system_suspend() without wait the idle thread. Without this
option enabled, this function will wait for the idle thread run but
will use the given power state instead of asking the policy manager.

The problem in both cases is that the process involves handling
devices and the way that was implemented if at least one device failed
to go to low power or suspended the system power state would not
change / be forced.

This commit simplifies this API removing the conditional behavior
since it is not clear the need for that and effectively, and
immediately, forces the system to go to the given state without
bother with devices.

Signed-off-by: default avatarFlavio Ceolin <flavio.ceolin@intel.com>
parent 10f29359
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment