Lines Matching full:device
27 SOC Power State describes processor and device power states implemented at
31 :dfn:`Device Runtime Power Management`
32 Device Runtime Power Management (PM) refers the capability of
54 * Device Power Management
140 Information about states can be found in the device tree, see
147 power savings, and with a minimum residency value (in device tree, see
178 Device Power Management Infrastructure
181 The device power management infrastructure consists of interfaces to the
182 :ref:`device_model_api`. These APIs send control commands to the device driver
185 Zephyr RTOS supports two methods of doing device power management.
187 * Runtime Device Power Management
190 Runtime Device Power Management
194 and has the best knowledge of their use, performs the device power management. This
198 be able to make decisions related to managing device power.
202 spend time doing device power management if the devices are already put in the
208 In this method device power management is mostly done inside
215 expected to be power aware and do not implement runtime device power management.
222 Refer to `Busy Status Indication`_ to see how to indicate whether a device is busy
225 Device Power Management States
227 The power management subsystem defines four device states.
228 These states are classified based on the degree of device context that gets lost
230 device behavior due to the state transition. Device context includes device
233 The four device power states:
237 Normal operation of the device. All device context is retained.
241 Device context is preserved by the HW and need not be restored by the driver.
245 Most device context is lost by the hardware. Device drivers must save and
250 Power has been fully removed from the device. The device context is lost
251 when this state is entered. Need to reinitialize the device when powering
254 Device Power Management Operations
258 to device drivers to indicate power management operations to perform. Each
259 device driver defines:
261 * The device's supported power states.
262 * The device's supported transitions between power states.
263 * The device's necessary operations to handle the transition between power states.
265 The following are some examples of operations that the device driver may perform
268 * Save/Restore device states.
273 Device Model with Power Management Support
283 Device Power Management API
289 Get Device List
294 size_t z_device_get_all_static(struct device const **device_list);
297 The SOC interface uses this API to get the device list. The SOC interface can use the list to
305 Device Set Power State
310 int pm_device_state_set(const struct device *dev, enum pm_device_state state);
313 device driver with the provided state.
315 Device Get Power State
320 int pm_device_state_get(const struct device *dev, enum pm_device_state *state);
330 the device is in the middle of a hardware transaction.
343 void device_busy_set(const struct device *busy_dev);
345 Sets a bit corresponding to the device, in a data structure maintained by the
353 void device_busy_clear(const struct device *busy_dev);
355 Clears the bit corresponding to the device in a data structure
356 maintained by the kernel to indicate that the device is not in the middle of
359 Check Busy Status of Single Device API
364 int device_busy_check(const struct device *chk_dev);
366 Checks whether a device is busy. The API returns 0 if the device
378 Checks if any device is busy. The API returns 0 if no device in the system is busy.
384 When a device has such capability, applications can enable or disable
385 this feature on a device dynamically using
388 This property can be set on device declaring the property ``wakeup-source`` in
389 the device node in devicetree. For example, this devicetree fragment sets the
390 ``gpio0`` device as a "wakeup" source:
406 during the device initialization. Applications can enable this functionality
414 configuration required by the device to support it.
418 Device Runtime Power Management
421 The Device Runtime Power Management framework is an Active Power
427 device power state accordingly based on the usage count.
429 The interfaces and APIs provided by the Device Runtime PM are
432 Device Runtime Power Management API
435 The Device Drivers use these APIs to perform device runtime power
438 Enable Device Runtime Power Management of a Device API
443 void pm_device_enable(const struct device *dev);
445 Enables Runtime Power Management of the device.
447 Disable Device Runtime Power Management of a Device API
452 void pm_device_disable(const struct device *dev);
454 Disables Runtime Power Management of the device.
456 Resume Device asynchronously API
461 int pm_device_get_async(const struct device *dev);
463 Marks the device as being used. This API will asynchronously
464 bring the device to resume state if it was suspended. If the device
465 was already active, it just increments the device usage count.
468 Device drivers can monitor this operation to finish calling
471 Resume Device synchronously API
476 int pm_device_get(const struct device *dev);
478 Marks the device as being used. It will bring up or resume
479 the device if it is in suspended state based on the device
480 usage count. This call is blocked until the device PM state
483 Suspend Device asynchronously API
488 int pm_device_put_async(const struct device *dev);
490 Releases a device. This API asynchronously puts the device to suspend
491 state if not already in suspend state if the usage count of this device
494 Device drivers can monitor this operation to finish calling
497 Suspend Device synchronously API
502 int pm_device_put(const struct device *dev);
504 Marks the device as being released. It will put the device to
505 suspended state if is is in active state based on the device
506 usage count. This call is blocked until the device PM state
508 call is blocked until the device is suspended.
523 This flag is enabled if the SOC interface and the devices support device power
543 Device Power Management APIs