power: Support power lock for headless profile 86/317186/2 accepted/tizen_unified_x_asan accepted/tizen/unified/20250115.124138 accepted/tizen/unified/x/20250115.142718 accepted/tizen/unified/x/asan/20250211.003213
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 27 Nov 2024 08:18:40 +0000 (17:18 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 10 Jan 2025 04:55:37 +0000 (13:55 +0900)
commitcc7fc1a168cbc8c752e09eeac58f1c8f648da165
tree1a41635130fbb36dc2ce974bd4d73ce097685f97
parentedd3e96b86c209106fe8de4ed05087914b275960
power: Support power lock for headless profile

The functions below have become operational on headless profile.
 - device_power_request_lock()
 - device_power_release_lock()

In addition, the functions below have become working properly as well
on headless profile associated with the functions aboves.
 - device_power_get_lock_count()
 - device_power_add_lock_count_changed_callback()
 - device_power_remove_lock_count_changed_callback()

Note that, device_power_change_state() bypasses power locks. This policy
stands valid on both headed and headless profile. So it is encouraged
that checking POWER_LOCK_CPU count using device_power_get_lock_count()
before calling device_power_change_state() for DEVICE_POWER_STATE_SLEEP.

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