From 0ae8aa2f87c16319ceaa7efaa005fa14ac1001d8 Mon Sep 17 00:00:00 2001 From: Chanwoo Choi Date: Thu, 17 Aug 2023 19:51:40 +0900 Subject: plugin-api: deviced: power: Add struct syscommon_plugin_deviced_power_trans_info 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 --- .../deviced/include/syscommon-plugin-deviced-power-interface.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h b/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h index 95394c1..71f0b89 100644 --- a/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h +++ b/src/plugin-api/deviced/include/syscommon-plugin-deviced-power-interface.h @@ -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")) -- cgit v1.2.3