power: unify power state transition routine 17/275117/19
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 17 May 2022 02:49:27 +0000 (11:49 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 30 May 2022 02:16:31 +0000 (02:16 +0000)
commit5b385f6b415311ba8dc871e4383894f53e0ff9a2
tree253ce26291a1b856b0ea2c89c44c363809e2d871
parentd134245613be47a5b31f5881f25a9591fc820517
power: unify power state transition routine

 Previously, the iot-headless dedicated poweroff was working on top of
the core poweroff routine. Integrate them into the single poweroff
routine so that all type of poweroff is now take the same subroutine.

 In addition to this, there two internal functions have been added for
deviced to trigger change power state by itself. All power state change
thorugh these functions take the same subroutine.
 - power_request_change_state_strict()
 - power_request_change_state()

 Due to the above changes, the deviced is now able to broadcast all
types of power change state in the unified manner. Therefore, if
someone wants to know the power state change of deviced, just use
power API.

Change-Id: I6573872eb3aa7c50d2d6af575ccce4dc25cab3de
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
26 files changed:
conf/power-profile-iot-headed.conf
conf/power-profile-iot-headless.conf
conf/power-profile-mobile.conf
conf/power-profile-tv.conf
conf/power-profile-wearable.conf
plugins/iot-headed/display/core.c
plugins/iot-headless/battery/battery-plugin.c
plugins/iot-headless/input/input-config.c
plugins/mobile/display/core.c
plugins/tv/display/core.c
plugins/tv/display/state-tv.c
plugins/wearable/display/core.c
src/battery/lowbat-handler.c
src/battery/lowbat-handler.h
src/core/main.c
src/power/power-boot.c
src/power/power-boot.h
src/power/power-dbus.c
src/power/power-off.c
src/power/power-off.h
src/power/power-state-manager.c [deleted file]
src/power/power-state-manager.h [deleted file]
src/power/power-state-wait.c
src/power/power-state-wait.h
src/power/power.c [new file with mode: 0644]
src/power/power.h [new file with mode: 0644]