power: subdivide power state 05/284005/8
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 8 Nov 2022 09:09:48 +0000 (18:09 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 6 Dec 2022 06:52:22 +0000 (15:52 +0900)
commitd79dd08f1fcc0f7e6d9d40b506d67062ffad48fa
treee5769e2dee2296855b57735e1ecf0b9067016e1b
parentadd942797e551eb67431980d8e95bb431c279d28
power: subdivide power state

 Introduce transient state, SUSPENDING/RESUMING and they have 3 variants
each, EARLY, NORMAL and LATE. As the deviced always follows these transient
states in order, those transient state help other processes synchronize
each other by registering callbacks on each transient state.
 As the type of state has been subdivided, static ans transient, the
functions responsible for those types have also been subdivided.

For those static states, such as POWER_STATE_NORMAL,
 - device_power_add_change_state_wait_callback
 - device_power_remove_change_state_wait_callback
 - device_power_change_state_wait_done
 - device_power_change_state

For those transient states, such as POWER_STATE_TRANSIENT_RESUMING,
 - device_power_add_transient_state_wait_callback
 - device_power_remove_transient_state_wait_callback
 - device_power_change_state_wait_done

 In addition, the dbus signal name used by both capi-system-device and
the deviced has been moved to libsyscommon.
 - DEVICED_SIGNAL_POWER_CHANGE_STATE_TO_START
 - DEVICED_SIGNAL_POWER_CHANGE_STATE_TO_NORMAL
 - ...

Change-Id: I7b6d19ace2f2b73388cacc9d9344b717c0fde087
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
include/power-internal.h
src/power-internal.c