Home
last modified time | relevance | path

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

12345678910>>...27

/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 …]
DKconfig10 This option must be selected by SoCs that provide PM hooks, that is,
13 config PM config
24 if PM
26 module = PM
56 endif # PM
100 Enable Runtime Power Management to save power. With device runtime PM
109 On system suspend / resume do not trigger the Device PM hooks but
110 only rely on Runtime PM to manage the devices power states.
/Zephyr-latest/dts/arm/atmel/
Dsamd20.dtsi21 clocks = <&gclk 0x13>, <&pm 0x20 8>;
22 clock-names = "GCLK", "PM";
30 clocks = <&gclk 0x14>, <&pm 0x20 10>;
31 clock-names = "GCLK", "PM";
39 clocks = <&gclk 0x16>, <&pm 0x20 14>;
40 clock-names = "GCLK", "PM";
48 clocks = <&gclk 26>, <&pm 0x20 18>;
49 clock-names = "GCLK", "PM";
54 clocks = <&gclk 0xd>, <&pm 0x20 2>;
55 clock-names = "GCLK", "PM";
[all …]
Dsamd21.dtsi41 clocks = <&gclk 0x1d>, <&pm 0x20 14>;
42 clock-names = "GCLK", "PM";
50 clocks = <&gclk 26>, <&pm 0x20 8>;
51 clock-names = "GCLK", "PM";
62 clocks = <&gclk 26>, <&pm 0x20 9>;
63 clock-names = "GCLK", "PM";
74 clocks = <&gclk 27>, <&pm 0x20 10>;
75 clock-names = "GCLK", "PM";
86 clocks = <&gclk 33>, <&pm 0x20 18>;
87 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.c229 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
230 PM_UNLOCK_ADDR((uint32_t)&PM->CPUSEL - (uint32_t)PM); in clock_init()
231 PM->CPUSEL = PM_CPUSEL_CPUSEL(0); in clock_init()
233 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
234 PM_UNLOCK_ADDR((uint32_t)&PM->PBASEL - (uint32_t)PM); in clock_init()
235 PM->PBASEL = PM_PBASEL_PBSEL(0); in clock_init()
237 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
238 PM_UNLOCK_ADDR((uint32_t)&PM->PBBSEL - (uint32_t)PM); in clock_init()
239 PM->PBBSEL = PM_PBBSEL_PBSEL(0); in clock_init()
241 PM->UNLOCK = PM_UNLOCK_KEY(0xAAu) | in clock_init()
[all …]
/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/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/tests/drivers/uart/uart_pm/
Dtestcase.yaml20 drivers.uart.pm:
27 drivers.uart.pm.no_rxpin:
40 drivers.uart.pm.enhanced_poll:
51 drivers.uart.pm.int_driven:
59 drivers.uart.pm.int_driven.enhanced_poll:
71 drivers.uart.pm.async:
79 drivers.uart.pm.async.enhanced_poll:
/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/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_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/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"
/Zephyr-latest/tests/subsys/pm/policy_api/
Dtestcase.yaml5 tags: pm
12 pm.policy.api.default: {}
13 pm.policy.api.app:

12345678910>>...27