Home
last modified time | relevance | path

Searched full:pm (Results 1 – 25 of 698) sorted by relevance

12345678910>>...28

/Zephyr-latest/subsys/pm/
Ddevice_runtime.c8 #include <zephyr/pm/device.h>
9 #include <zephyr/pm/device_runtime.h>
50 struct pm_device *pm = dev->pm; in runtime_suspend() local
55 if (!atomic_test_bit(&pm->base.flags, PM_DEVICE_FLAG_RUNTIME_ENABLED)) { in runtime_suspend()
62 ret = k_sem_take(&pm->lock, k_is_in_isr() ? K_NO_WAIT : K_FOREVER); in runtime_suspend()
68 if (pm->base.usage == 0U) { in runtime_suspend()
74 pm->base.usage--; in runtime_suspend()
75 if (pm->base.usage > 0U) { in runtime_suspend()
81 pm->base.state = PM_DEVICE_STATE_SUSPENDING; in runtime_suspend()
82 (void)k_work_schedule(&pm->work, delay); in runtime_suspend()
[all …]
Ddevice.c8 #include <zephyr/pm/device.h>
9 #include <zephyr/pm/device_runtime.h>
45 struct pm_device_base *pm = dev->pm_base; in pm_device_action_run() local
48 if (pm == NULL) { in pm_device_action_run()
53 if (pm->state == action_target_state[action]) { in pm_device_action_run()
56 if (pm->state != action_expected_state[action]) { in pm_device_action_run()
60 ret = pm->action_cb(dev, action); in pm_device_action_run()
77 atomic_set_bit(&pm->flags, PM_DEVICE_FLAG_TURN_ON_FAILED); in pm_device_action_run()
81 pm->state = action_target_state[action]; in pm_device_action_run()
89 pm->state = action_target_state[action]; in pm_device_action_run()
[all …]
Dpm_shell.c9 #include <zephyr/pm/device.h>
10 #include <zephyr/pm/device_runtime.h>
14 return dev->pm != NULL; in pm_device_filter()
41 shell_error(sh, "Device %s uses runtime PM, use the runtime functions instead", in pm_cmd_suspend()
67 shell_error(sh, "Device %s uses runtime PM, use the runtime functions instead", in pm_cmd_resume()
94 shell_error(sh, "Device %s is not using runtime PM", dev->name); in pm_cmd_runtime_get()
119 shell_error(sh, "Device %s is not using runtime PM", dev->name); in pm_cmd_runtime_put()
144 shell_error(sh, "Device %s is not using runtime PM", dev->name); in pm_cmd_runtime_put_async()
161 "Call the PM suspend action on a device",
164 "Call the PM resume action on a device",
[all …]
/Zephyr-latest/dts/arm/atmel/
Dsamd20.dtsi22 clocks = <&gclk 0x13>, <&pm 0x20 8>;
23 clock-names = "GCLK", "PM";
33 clocks = <&gclk 0x14>, <&pm 0x20 10>;
34 clock-names = "GCLK", "PM";
44 clocks = <&gclk 0x16>, <&pm 0x20 14>;
45 clock-names = "GCLK", "PM";
55 clocks = <&gclk 26>, <&pm 0x20 18>;
56 clock-names = "GCLK", "PM";
62 clocks = <&gclk 2>, <&pm 0x18 5>;
63 clock-names = "GCLK", "PM";
[all …]
Dsamd21.dtsi42 clocks = <&gclk 0x1d>, <&pm 0x20 14>;
43 clock-names = "GCLK", "PM";
53 clocks = <&gclk 26>, <&pm 0x20 8>;
54 clock-names = "GCLK", "PM";
67 clocks = <&gclk 26>, <&pm 0x20 9>;
68 clock-names = "GCLK", "PM";
81 clocks = <&gclk 27>, <&pm 0x20 10>;
82 clock-names = "GCLK", "PM";
95 clocks = <&gclk 33>, <&pm 0x20 18>;
96 clock-names = "GCLK", "PM";
[all …]
/Zephyr-latest/soc/atmel/sam/common/
Dsoc_sam4l_pm.c7 * @brief Atmel SAM4L MCU family Power Management (PM) module
54 mask = *(&PM->CPUMASK + bus_id); in soc_pmc_peripheral_enable()
56 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in soc_pmc_peripheral_enable()
57 PM_UNLOCK_ADDR(((uint32_t)&PM->CPUMASK - in soc_pmc_peripheral_enable()
58 (uint32_t)PM) + in soc_pmc_peripheral_enable()
60 *(&PM->CPUMASK + bus_id) = mask; in soc_pmc_peripheral_enable()
80 mask = *(&PM->CPUMASK + bus_id); in soc_pmc_peripheral_disable()
82 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in soc_pmc_peripheral_disable()
83 PM_UNLOCK_ADDR(((uint32_t)&PM->CPUMASK - in soc_pmc_peripheral_disable()
84 (uint32_t)PM) + in soc_pmc_peripheral_disable()
[all …]
/Zephyr-latest/tests/benchmarks/footprints/src/
Dpm_device.c13 #include <zephyr/pm/device.h>
14 #include <zephyr/pm/device_runtime.h>
40 /* Get the PM state from a device with PM support */ in run_pm_device()
43 printk("\n PM device get state failed\n"); in run_pm_device()
48 printk("\n PM device runtime get failed\n"); in run_pm_device()
53 printk("\n PM device runtime put failed\n"); in run_pm_device()
57 /* Get the PM state from a device without PM support */ in run_pm_device()
60 printk("\n PM device get state did not fail\n"); in run_pm_device()
/Zephyr-latest/tests/subsys/pm/power_mgmt/
Dtestcase.yaml3 tags: pm
5 pm.system: {}
6 pm.system.no.device.pm:
8 - CONF_FILE="no-device-pm.conf"
/Zephyr-latest/tests/subsys/pm/device_driver_init/
Dtestcase.yaml7 - pm
9 pm.device_driver_init: {}
10 pm.device_driver_init.pm:
14 pm.device_driver_init.pm_device_runtime:
/Zephyr-latest/subsys/pm/policy/
DKconfig4 if PM
12 bool "Default PM policy"
14 This option selects the default PM policy. Default policy is based
19 bool "Custom PM Policy"
34 endif # PM
38 depends on !PM
41 requirements on systems that do not support PM (e.g. systems whithout
Dpolicy_device_lock.c8 #include <zephyr/pm/policy.h>
9 #include <zephyr/pm/state.h>
11 #include <zephyr/pm/device.h>
20 * @brief Synthesize the name of the object that holds a device pm constraint.
27 * @brief initialize a device pm constraint with information from devicetree.
38 * @brief Helper macro to define a device pm constraints.
47 * @brief Helper macro to generate a list of device pm constraints.
56 * @brief Helper macro to define an array of device pm constraints.
70 * @brief Helper macro to initialize a pm state device constraint
80 * @brief Helper macro to initialize a pm state device constraint
/Zephyr-latest/soc/atmel/sam/sam4l/
Dsoc.c217 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
218 PM_UNLOCK_ADDR((uint32_t)&PM->CPUSEL - (uint32_t)PM); in clock_init()
219 PM->CPUSEL = PM_CPUSEL_CPUSEL(0); in clock_init()
221 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
222 PM_UNLOCK_ADDR((uint32_t)&PM->PBASEL - (uint32_t)PM); in clock_init()
223 PM->PBASEL = PM_PBASEL_PBSEL(0); in clock_init()
225 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
226 PM_UNLOCK_ADDR((uint32_t)&PM->PBBSEL - (uint32_t)PM); in clock_init()
227 PM->PBBSEL = PM_PBBSEL_PBSEL(0); in clock_init()
229 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
[all …]
/Zephyr-latest/tests/subsys/pm/power_mgmt/boards/
Dnative_sim.overlay17 zephyr,pm-device-disabled;
23 compatible = "test-device-pm";
27 compatible = "test-device-pm";
31 compatible = "test-device-pm";
35 compatible = "test-device-pm";
39 compatible = "test-device-pm";
/Zephyr-latest/include/zephyr/pm/
Ddevice.h30 /** @brief Device PM flags. */
49 /** Indicates if device runtime PM should be automatically enabled */
51 /** Indicates that device runtime PM supports suspending and resuming from any context. */
57 /** @brief Flag indicating that runtime PM API for the device can be called from any context.
59 * If @ref PM_DEVICE_ISR_SAFE flag is used for device definition, it indicates that PM actions
62 * less resources (~80 byte less RAM) and allows to use device runtime PM from any context
89 /** @brief Device PM actions. */
110 * @brief Device PM action callback.
123 * @brief Device PM action failed callback
134 * @brief Device PM info
[all …]
Ddevice_runtime.h30 * zephyr,pm-device-runtime-auto property in pm.yaml and z_sys_init_run_level.
34 * @retval 0 If the device runtime PM is enabled successfully or it has not
36 * @retval -errno Other negative errno, result of enabled device runtime PM.
41 * @brief Enable device runtime PM
43 * This function will enable runtime PM on the given device. If the device is
50 * @retval 0 If the device runtime PM is enabled successfully.
52 * @retval -ENOTSUP If the device does not support PM.
60 * @brief Disable device runtime PM
68 * @retval 0 If the device runtime PM is disabled successfully.
69 * @retval -ENOTSUP If the device does not support PM.
[all …]
/Zephyr-latest/tests/drivers/uart/uart_pm/
Dtestcase.yaml21 drivers.uart.pm:
27 drivers.uart.pm.no_rxpin:
42 drivers.uart.pm.enhanced_poll:
53 drivers.uart.pm.int_driven:
60 drivers.uart.pm.int_driven.enhanced_poll:
72 drivers.uart.pm.async:
79 drivers.uart.pm.async.enhanced_poll:
/Zephyr-latest/dts/bindings/power-domain/
Dpower-domain-soc-state-change.yaml18 The registered devices will be turned off before the PM subsystem
19 enters these PM states. The devices will be turned on after the
20 PM subsystem exits these PM states.
/Zephyr-latest/dts/xtensa/intel/
Dintel_adsp_ace30.dtsi173 zephyr,pm-device-runtime-auto;
184 zephyr,pm-device-runtime-auto;
222 zephyr,pm-device-runtime-auto;
230 zephyr,pm-device-runtime-auto;
238 zephyr,pm-device-runtime-auto;
246 zephyr,pm-device-runtime-auto;
254 zephyr,pm-device-runtime-auto;
262 zephyr,pm-device-runtime-auto;
270 zephyr,pm-device-runtime-auto;
278 zephyr,pm-device-runtime-auto;
[all …]
Dintel_adsp_ace30_ptl.dtsi178 zephyr,pm-device-runtime-auto;
189 zephyr,pm-device-runtime-auto;
227 zephyr,pm-device-runtime-auto;
235 zephyr,pm-device-runtime-auto;
243 zephyr,pm-device-runtime-auto;
251 zephyr,pm-device-runtime-auto;
259 zephyr,pm-device-runtime-auto;
267 zephyr,pm-device-runtime-auto;
275 zephyr,pm-device-runtime-auto;
283 zephyr,pm-device-runtime-auto;
[all …]
/Zephyr-latest/tests/subsys/pm/device_runtime_api/src/
Dtest_driver.h15 * In this mode the driver will not end PM action until signaled, thus
23 * @brief Unblock test driver PM action.
30 * @brief Check if PM actions is ongoing.
34 * @return true If PM action is ongoing.
35 * @return false If PM action is not ongoing.
/Zephyr-latest/tests/subsys/pm/device_runtime_api/
Dtestcase.yaml2 tags: pm
5 pm.device_runtime.api:
8 pm.device_runtime.isr_safe.api:
/Zephyr-latest/tests/subsys/pm/power_domain_soc_state_change/dts/bindings/
Dtest-device-pm.yaml4 include: [base.yaml, pm.yaml]
8 tests/subsys/pm/power_domain_soc_state_change test in Zephyr.
10 compatible: "test-device-pm"
/Zephyr-latest/tests/subsys/pm/power_domain/dts/bindings/
Dtest-device-pm.yaml4 include: [base.yaml, pm.yaml]
8 tests/subsys/pm/power_domain test in Zephyr.
10 compatible: "test-device-pm"
/Zephyr-latest/tests/subsys/pm/device_runtime_api/dts/bindings/
Dtest-device-pm.yaml4 include: [base.yaml, pm.yaml]
8 tests/subsys/pm/device_runtime_api test in Zephyr.
10 compatible: "test-device-pm"
/Zephyr-latest/tests/subsys/pm/power_states_api/dts/bindings/
Dtest-device-pm.yaml4 include: [base.yaml, pm.yaml]
8 tests/subsys/pm/power_states_api test in Zephyr.
10 compatible: "test-device-pm"

12345678910>>...28