pm: device: Add wakeup source API

Introduce a new API to allow devices capable of wake up the system
register themselves was wake up sources. This permits applications to
select the most appropriate way to wake up the system when it is
suspended.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-06-30 14:32:56 -07:00 committed by Christopher Friedt
commit 8eceeee798
7 changed files with 115 additions and 3 deletions

View file

@ -1,5 +1,7 @@
# Common fields for all devices
include: [pm.yaml]
properties:
status:
type: string

18
dts/bindings/base/pm.yaml Normal file
View file

@ -0,0 +1,18 @@
# Copyright (c) 2021 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0
# Properties for Power Management (PM)
properties:
wakeup-source:
required: false
type: boolean
description: |
Property to identify that a device can be used as wake up source.
When this property is provided a specific flag is set into the
device that tells the system that the device is capable of
wake up the system.
Wake up capable devices are disabled (interruptions will not wake up
the system) by default but they can be enabled at runtime if necessary.