power: add getter wakeup reason 37/284937/4
authorTaeminYeom <taemin.yeom@samsung.com>
Thu, 1 Dec 2022 08:59:14 +0000 (17:59 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Fri, 16 Dec 2022 03:03:29 +0000 (12:03 +0900)
commit5f262d9d915ec4b49e6a78a0bec04bfb30f3fdfd
tree0561b10ba3e120862f0d6183eee079ea72787f78
parent98289c214d9a610c009505639353bb49a8f69d65
power: add getter wakeup reason

Add function to get wakeup reason by calling hal api function
and save wakup reason.

Add dbus method to delliver saved wakeup reason to device API.

"wakeup reason" is the power transition state reason of sleep to normal.
There are several reasons why the device wakeup and
sometimes it Is needed to get the reason.

added dbus method:
dbus_power_get_wakeup_reason
  path: "/Org/Tizen/System/DeviceD/Power"
  interace: "org.tizen.system.deviced.Power"
  member: "PowerGetWakeupReason"
  paremeter: "(i)", enum transition reason to get.
  return: "(i)", 0 on success, negative on error.

Change-Id: I2f96fecb3bc1308afc712421e3b2f6c8a7efefea
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
src/power/power-dbus.c
src/power/power-suspend.c
src/power/power-suspend.h