Change pm_power_state_force to receive which cpu the state should be
forced. Also, it changed the API behavior to force the given state only
when the idle thread for that core is executed.
In a multicore environment force arbitrarily a core to suspend is not
safe because the kernel cannot infer what that cpu is running and how it
impacts the overall system, for example, if it is holding a lock that is
required by a thread that is running in another cpu.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Convert remaining tests and samples to using find_package() instead of
literally including the CMake boilerplate code.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
pm_power_state_force no longer requires the idle thread to run. Just
removing the following k_sleep for two reasons, first it is not
necessary, second it tests that pm_power_state_force works as it
should.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
In the last step of the example, the system should go into soft off
state in order to match the original intent in the example to go
into the hardware's SHUTDOWN mode.
Fixes#31727
Signed-off-by: Vincent Wan <vanti.coder@gmail.com>
Change subsystem to use struct pm_state with substate-id instead of
using only the power state category.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Migrate the whole pm subsystem to use new power states information
from power_state.h and get states and residency properties from
device tree.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
- Remove SYS_ prefix
- shorten POWER_MANAGEMENT to just PM
- DEVICE_POWER_MANAGEMENT -> PM_DEVICE
and use PM_ as the prefix for all PM related Kconfigs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To obtain lower power measurements in general, we should turn off the
external flash which is on by default at boot.
Code is modeled based on examples shipped in the TI SimpleLink SDK.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Adding an example that exercises the sleep modes, then powers off the
system by going into deep sleep.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>