halapi: common: add device power interface 42/284942/4 accepted/tizen/unified/20221220.180328
authorTaeminYeom <taemin.yeom@samsung.com>
Thu, 1 Dec 2022 09:28:28 +0000 (18:28 +0900)
committerTaeminYeom <taemin.yeom@samsung.com>
Thu, 15 Dec 2022 08:27:35 +0000 (17:27 +0900)
To add device wakeup source function in device hal, it is needed.

Change-Id: I23d23f758134bea3bc02c488154a737f3e85c1d1
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
include/hal-common.h
src/hal-api-list.h

index 3f2826b..6b632bb 100644 (file)
@@ -75,6 +75,7 @@ enum hal_module {
        HAL_MODULE_DEVICE_HAPTIC,
        HAL_MODULE_DEVICE_MEMORY,
        HAL_MODULE_DEVICE_INPUT,
+       HAL_MODULE_DEVICE_POWER,
 
        /*
         * TODO: If need to add new module, have to add it below
index b3ccf97..f928543 100644 (file)
@@ -274,6 +274,13 @@ static struct hal_abi_version_match abi_version_match_data[HAL_MODULE_END][HAL_A
                        .backend_min_abi_version = HAL_ABI_VERSION_TIZEN_7_0,
                },
        },
+       [HAL_MODULE_DEVICE_POWER] = {
+               /* FIXME: Need to be initialized by configuration file like xml */
+               [0] = {
+                       .platform_abi_version = HAL_ABI_VERSION_TIZEN_7_5,
+                       .backend_min_abi_version = HAL_ABI_VERSION_TIZEN_7_0,
+               },
+       },
 };
 
 static struct __hal_module_info g_hal_module_info[] = {
@@ -756,6 +763,19 @@ static struct __hal_module_info g_hal_module_info[] = {
                .abi_versions           = abi_version_match_data[HAL_MODULE_DEVICE_INPUT],
                .hal_api                = true,
        },
+       [HAL_MODULE_DEVICE_POWER] = {
+               .group                  = HAL_GROUP_SYSTEM,
+               .module                 = HAL_MODULE_DEVICE_POWER,
+               .license                = HAL_LICENSE_APACHE_2_0,
+               .module_name            = "HAL_MODULE_DEVICE_POWER",
+               .backend_module_name    = "device-power",
+               .library_name           = "/hal/lib/libhal-backend-device-power.so",
+               .library_name_64bit     = "/hal/lib64/libhal-backend-device-power.so",
+               .symbol_name            = "hal_backend_device_power_data",
+               .num_abi_versions       = ARRAY_SIZE(abi_version_match_data[HAL_MODULE_DEVICE_POWER]),
+               .abi_versions           = abi_version_match_data[HAL_MODULE_DEVICE_POWER],
+               .hal_api                = true,
+       },
 };
 
 #endif /* __HAL_API_LIST_H__ */