power: Support power lock for headless profile 15/318215/1 accepted/tizen/9.0/unified/20250115.070549
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 27 Nov 2024 08:18:40 +0000 (17:18 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 14 Jan 2025 07:30:03 +0000 (16:30 +0900)
commit825a2828831f47ceab74d4cab6ec4d98ac0c91e7
tree30302ed276a0f70313a2e8d1fbf09514be591d2f
parent9fc4328630479e8027b211859369ee182c713006
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