plugin-api: deviced: power: Add struct syscommon_plugin_deviced_power_trans_info 71/297371/3
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 17 Aug 2023 10:51:40 +0000 (19:51 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 18 Aug 2023 01:00:39 +0000 (10:00 +0900)
Add struct syscommon_plugin_deviced_power_trans_info which contains the
power transition information.

[Detailed description]
struct syscommon_plugin_deviced_power_trans_info
- curr : Current power state
- next : Next power state for transition
- reason : Transition reason when changing the state from curr to next
- void *data : Passed data of transition information

Change-Id: I69450db85c4303f77f7675270a4a1890e0f98bbe
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h

index 95394c1..71f0b89 100644 (file)
@@ -73,6 +73,13 @@ enum {
 
 #define DEVICED_POWER_STATE_INDEX(state)               (__builtin_ctzll(state))
 
+struct syscommon_plugin_deviced_power_trans_info {
+       u_int64_t curr;
+       u_int64_t next;
+       int reason;
+       const void *data;
+};
+
 static inline u_int64_t syscommon_plugin_deviced_power_convert_to_power_state(const char *str)
 {
        if (MATCH(str, "start"))