pm: Add power domain infra structure

Add support for power domains on Zephyr. Power domains are implemented
as simple devices so they can use the existent Zephyr API, for resume
and suspend sync and async and also reference count.

The pm subsystem will ensure that domains are resumed before and
suspended after devices using them. For device runtime power
management, every time the device is got or released the same actions
is done to the domain it belongs.

As domains are implemented as simple devices, it is totally acceptable
a domain belongs to another domain.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-10-01 14:07:28 -07:00 committed by Anas Nashif
commit ddfa048058
4 changed files with 47 additions and 0 deletions

View file

@ -16,3 +16,13 @@ properties:
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.
power-domain:
required: false
type: phandle
description: |
Power domain the device belongs to.
The device will be notified when the power domain it belongs to is either
suspended or resumed.