Home
last modified time | relevance | path

Searched refs:pm (Results 1 – 25 of 83) sorted by relevance

1234

/Zephyr-Core-3.6.0/subsys/pm/
Ddevice_runtime.c50 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()
85 ret = pm->base.action_cb(pm->dev, PM_DEVICE_ACTION_SUSPEND); in runtime_suspend()
87 pm->base.usage++; in runtime_suspend()
[all …]
Ddevice.c45 struct pm_device_base *pm = dev->pm_base; in pm_device_action_run() local
48 if (pm == NULL) { in pm_device_action_run()
57 if (pm->state == action_target_state[action]) { in pm_device_action_run()
60 if (pm->state != action_expected_state[action]) { in pm_device_action_run()
64 ret = pm->action_cb(dev, action); in pm_device_action_run()
81 atomic_set_bit(&pm->flags, PM_DEVICE_FLAG_TURN_ON_FAILED); in pm_device_action_run()
85 pm->state = action_target_state[action]; in pm_device_action_run()
93 pm->state = action_target_state[action]; in pm_device_action_run()
96 atomic_clear_bit(&pm->flags, PM_DEVICE_FLAG_PD_CLAIMED); in pm_device_action_run()
97 atomic_clear_bit(&pm->flags, PM_DEVICE_FLAG_TURN_ON_FAILED); in pm_device_action_run()
[all …]
Dpm.c23 LOG_MODULE_REGISTER(pm, CONFIG_PM_LOG_LEVEL);
174 SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, ticks); in pm_system_suspend()
192 SYS_PORT_TRACING_FUNC_EXIT(pm, system_suspend, ticks, in pm_system_suspend()
204 SYS_PORT_TRACING_FUNC_EXIT(pm, system_suspend, ticks, in pm_system_suspend()
249 SYS_PORT_TRACING_FUNC_EXIT(pm, system_suspend, ticks, in pm_system_suspend()
/Zephyr-Core-3.6.0/dts/arm/atmel/
Dsamd20.dtsi21 clocks = <&gclk 0x13>, <&pm 0x20 8>;
29 clocks = <&gclk 0x14>, <&pm 0x20 10>;
37 clocks = <&gclk 0x16>, <&pm 0x20 14>;
45 clocks = <&gclk 26>, <&pm 0x20 18>;
51 clocks = <&gclk 0xd>, <&pm 0x20 2>;
57 clocks = <&gclk 0xe>, <&pm 0x20 3>;
63 clocks = <&gclk 0xf>, <&pm 0x20 4>;
69 clocks = <&gclk 0x10>, <&pm 0x20 5>;
75 clocks = <&gclk 0x11>, <&pm 0x20 6>;
81 clocks = <&gclk 0x12>, <&pm 0x20 7>;
[all …]
Dsamd21.dtsi34 clocks = <&gclk 0x1d>, <&pm 0x20 14>;
42 clocks = <&gclk 26>, <&pm 0x20 8>;
53 clocks = <&gclk 26>, <&pm 0x20 9>;
64 clocks = <&gclk 27>, <&pm 0x20 10>;
75 clocks = <&gclk 33>, <&pm 0x20 18>;
81 clocks = <&gclk 0x14>, <&pm 0x20 2>;
87 clocks = <&gclk 0x15>, <&pm 0x20 3>;
93 clocks = <&gclk 0x16>, <&pm 0x20 4>;
99 clocks = <&gclk 0x17>, <&pm 0x20 5>;
105 clocks = <&gclk 0x18>, <&pm 0x20 6>;
[all …]
Dsamr21.dtsi51 clocks = <&gclk 26>, <&pm 0x20 8>;
62 clocks = <&gclk 26>, <&pm 0x20 9>;
73 clocks = <&gclk 27>, <&pm 0x20 10>;
84 clocks = <&gclk 0x14>, <&pm 0x20 2>;
90 clocks = <&gclk 0x15>, <&pm 0x20 3>;
96 clocks = <&gclk 0x16>, <&pm 0x20 4>;
102 clocks = <&gclk 0x17>, <&pm 0x20 5>;
108 clocks = <&gclk 0x18>, <&pm 0x20 6>;
114 clocks = <&gclk 0x19>, <&pm 0x20 7>;
120 clocks = <&gclk 0x1c>, <&pm 0x20 12>;
[all …]
/Zephyr-Core-3.6.0/tests/subsys/pm/power_mgmt/boards/
Dnative_sim.overlay9 compatible = "test-device-pm";
13 compatible = "test-device-pm";
17 compatible = "test-device-pm";
21 compatible = "test-device-pm";
/Zephyr-Core-3.6.0/drivers/sensor/lis2ds12/
Dlis2ds12.c44 if ((odr >= LIS2DS12_DT_ODR_1600Hz && cfg->pm != LIS2DS12_DT_HIGH_FREQUENCY) || in lis2ds12_set_odr()
45 (odr < LIS2DS12_DT_ODR_1600Hz && cfg->pm == LIS2DS12_DT_HIGH_FREQUENCY) || in lis2ds12_set_odr()
46 (odr == LIS2DS12_DT_ODR_1Hz_LP && cfg->pm != LIS2DS12_DT_LOW_POWER)) { in lis2ds12_set_odr()
56 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_12Hz5_LP : in lis2ds12_set_odr()
60 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_25Hz_LP : in lis2ds12_set_odr()
64 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_50Hz_LP : in lis2ds12_set_odr()
68 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_100Hz_LP : in lis2ds12_set_odr()
72 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_200Hz_LP : in lis2ds12_set_odr()
76 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_400Hz_LP : in lis2ds12_set_odr()
80 val = (cfg->pm == 1) ? LIS2DS12_XL_ODR_800Hz_LP : in lis2ds12_set_odr()
[all …]
/Zephyr-Core-3.6.0/tests/subsys/pm/power_domain/
Dapp.overlay14 compatible = "test-device-pm";
20 compatible = "test-device-pm";
31 compatible = "test-device-pm";
/Zephyr-Core-3.6.0/tests/subsys/pm/device_runtime_api/
Dapp.overlay3 compatible = "test-device-pm";
5 zephyr,pm-device-runtime-auto;
/Zephyr-Core-3.6.0/tests/subsys/pm/device_driver_init/
Dapp.overlay17 zephyr,pm-device-runtime-auto;
23 zephyr,pm-device-runtime-auto;
36 zephyr,pm-device-runtime-auto;
/Zephyr-Core-3.6.0/soc/x86/intel_ish/intel_ish5/
DKconfig.defconfig.series20 rsource "pm/Kconfig.pm"
/Zephyr-Core-3.6.0/drivers/counter/
Dcounter_cmos.c138 bool pm; in get_value() local
160 pm = false; in get_value()
162 pm = ((state.hour & HOUR_PM) == HOUR_PM); in get_value()
176 if (pm) { in get_value()
/Zephyr-Core-3.6.0/include/zephyr/
Ddevice.h131 #define DEVICE_DEFINE(dev_id, name, init_fn, pm, data, config, level, prio, \ argument
134 Z_DEVICE_DEFINE(DT_INVALID_NODE, dev_id, name, init_fn, pm, data, \
182 #define DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api, \ argument
186 DEVICE_DT_NAME(node_id), init_fn, pm, data, config, \
416 struct pm_device *pm; member
937 #define Z_DEVICE_BASE_DEFINE(node_id, dev_id, name, pm, data, config, level, prio, api, state, \ argument
944 Z_DEVICE_INIT(name, pm, data, config, api, state, deps)
1010 #define Z_DEVICE_DEFINE(node_id, dev_id, name, init_fn, pm, data, config, \ argument
1017 Z_DEVICE_BASE_DEFINE(node_id, dev_id, name, pm, data, config, level, \
/Zephyr-Core-3.6.0/include/zephyr/net/
Dvirtual.h292 pm, data, config, prio, api, mtu) \ argument
293 Z_NET_DEVICE_INIT(node_id, dev_id, name, init_fn, pm, data, \
319 #define NET_VIRTUAL_INTERFACE_INIT(dev_id, name, init_fn, pm, data, \ argument
322 init_fn, pm, data, config, prio, \
Dethernet.h936 #define Z_ETH_NET_DEVICE_INIT(node_id, dev_id, name, init_fn, pm, data, \ argument
939 Z_DEVICE_DEFINE(node_id, dev_id, name, init_fn, pm, data, \
947 #define Z_ETH_NET_DEVICE_INIT(node_id, dev_id, name, init_fn, pm, data, \ argument
949 Z_NET_DEVICE_INIT(node_id, dev_id, name, init_fn, pm, data, \
971 #define ETH_NET_DEVICE_INIT(dev_id, name, init_fn, pm, data, config, \ argument
974 pm, data, config, prio, api, mtu)
992 #define ETH_NET_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, \ argument
995 DEVICE_DT_NAME(node_id), init_fn, pm, \
Dnet_if.h2875 #define Z_NET_DEVICE_INIT(node_id, dev_id, name, init_fn, pm, data, \ argument
2878 Z_DEVICE_DEFINE(node_id, dev_id, name, init_fn, pm, data, \
2903 #define NET_DEVICE_INIT(dev_id, name, init_fn, pm, data, config, prio, \ argument
2905 Z_NET_DEVICE_INIT(DT_INVALID_NODE, dev_id, name, init_fn, pm, \
2926 #define NET_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, \ argument
2929 DEVICE_DT_NAME(node_id), init_fn, pm, data, \
2944 init_fn, pm, data, config, prio, \ argument
2947 Z_DEVICE_DEFINE(node_id, dev_id, name, init_fn, pm, data, \
2976 #define NET_DEVICE_INIT_INSTANCE(dev_id, name, instance, init_fn, pm, \ argument
2980 instance, init_fn, pm, data, config, \
[all …]
/Zephyr-Core-3.6.0/drivers/sensor/iis2dlpc/
Diis2dlpc.c44 if (cfg->pm == IIS2DLPC_CONT_LOW_PWR_12bit) { in iis2dlpc_set_range()
241 if (cfg->pm == IIS2DLPC_CONT_LOW_PWR_12bit) { in iis2dlpc_sample_fetch()
263 static int iis2dlpc_set_power_mode(stmdev_ctx_t *ctx, iis2dlpc_mode_t pm) in iis2dlpc_set_power_mode() argument
267 switch (pm) { in iis2dlpc_set_power_mode()
272 regval = pm; in iis2dlpc_set_power_mode()
313 LOG_INF("power-mode is %d", cfg->pm); in iis2dlpc_init()
314 if (iis2dlpc_set_power_mode(ctx, cfg->pm)) { in iis2dlpc_init()
451 .pm = DT_INST_PROP(inst, power_mode), \
/Zephyr-Core-3.6.0/doc/services/pm/
Dsystem.rst20 .. image:: images/system-pm.svg
28 * :zephyr_file:`samples/subsys/pm/device_pm/`
29 * :zephyr_file:`tests/subsys/pm/power_mgmt/`
30 * :zephyr_file:`tests/subsys/pm/power_mgmt_soc/`
31 * :zephyr_file:`tests/subsys/pm/power_states_api/`
85 :zephyr_file:`tests/subsys/pm/power_mgmt/`.
Ddevice.rst15 - :ref:`Device Runtime Power Management <pm-device-runtime-pm>`
16 - :ref:`System Power Management <pm-device-system-pm>`
18 .. _pm-device-runtime-pm:
36 For more information, see :ref:`pm-device-runtime`.
38 .. _pm-device-system-pm:
55 When using :ref:`pm-system`, device transitions can be run from the idle thread.
61 :ref:`Device Runtime Power Management <pm-device-runtime-pm>` is the **preferred**
193 subsystem can suspend devices, as described in :ref:`pm-device-system-pm`. This
246 using it. For more details, see :ref:`pm-power-domain`.
/Zephyr-Core-3.6.0/subsys/net/ip/
Dnet_stats.c197 GET_STAT(iface, pm.last_suspend_time)); in stats()
199 GET_STAT(iface, pm.suspend_count)); in stats()
201 (uint32_t)(GET_STAT(iface, pm.overall_suspend_time) / in stats()
202 GET_STAT(iface, pm.suspend_count))); in stats()
204 GET_STAT(iface, pm.overall_suspend_time)); in stats()
303 src = GET_STAT_ADDR(iface, pm); in net_stats_get()
/Zephyr-Core-3.6.0/include/zephyr/drivers/i3c/
Ddevicetree.h145 #define I3C_DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \ argument
147 DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, \
/Zephyr-Core-3.6.0/drivers/sensor/lis2dw12/
Dlis2dw12.c45 if (cfg->pm == LIS2DW12_CONT_LOW_PWR_12bit) { in lis2dw12_set_range()
329 if (cfg->pm == LIS2DW12_CONT_LOW_PWR_12bit) { in lis2dw12_sample_fetch()
352 lis2dw12_mode_t pm) in lis2dw12_set_power_mode() argument
358 switch (pm) { in lis2dw12_set_power_mode()
363 regval = pm; in lis2dw12_set_power_mode()
424 LOG_DBG("power-mode is %d", cfg->pm); in lis2dw12_init()
425 ret = lis2dw12_set_power_mode(dev, cfg->pm); in lis2dw12_init()
548 .pm = DT_INST_PROP(inst, power_mode), \
/Zephyr-Core-3.6.0/tests/subsys/pm/device_wakeup_api/
DCMakeLists.txt7 project(pm-states-test)
/Zephyr-Core-3.6.0/tests/subsys/pm/power_states_api/
DCMakeLists.txt7 project(pm-states-test)

1234