power: refactor power change state wait API
Hide state index enumeration into source code
- It has been changed to be defined by enumeration
DEVICE_POWER_STATE_*.
Introduce enumeration for transition reason
- power_transition_reason_e
Rearrange value of enumeration device_power_state_e
and device_power_transient_state_e
- Previously, those enumerations share bit not to overlap each other.
This somehow implies those enumerations are related each other. To
clarify that they have nothing to do with each other, rearranged bit.
- From the above change, the APIs have changed to support exclusive
register/unregister/callback subroutine by enumeration type.
• device_power_add_state_wait_callback()
• device_power_add_transient_state_wait_callback()
• device_power_remove_state_wait_callback()
• device_power_remove_transient_wait_callback()
- Each callback has parameter of corresponding state enumeration type.
- Callback now receives each information directly from parameter
instead of struct device_change_state_info. The struct
device_change_state_info has been removed.
- Only the device_power_wait_done() has left unchanged in that it
can be utilized by callback of both enumeration type.
Change-Id: I991994a3bb5e648db4aefde252c5bde1feeca86d
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>