power: add internal function for deferring sleep 35/266735/5
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 18 Nov 2021 04:14:51 +0000 (13:14 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 19 Nov 2021 07:39:27 +0000 (16:39 +0900)
commit7d851ddb5d84b1a24255906a301b71ea7350b811
tree228ed0c967fa367bf050c318a1d58b3c7cfabaa5
parentd6115aecf5c8840682a7362f938688c2ad59b031
power: add internal function for deferring sleep

Someone who wants to defer sleep can now request for deferring sleep to
system using device_power_add_sleep_callback(). The callback is invoked
when the system is going to sleep. Do your todo list for sleep in this
callback, and return DEVICE_SLEEP_READY, which notifies the system you
are ready to sleep.

Change-Id: I5dfbe60abbfaa30991124cfd5eea243f85a80d02
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
include/power-internal.h
src/power-internal.c [new file with mode: 0644]