pass-hal: tw3: Rename files and functions 35/202835/1 accepted/tizen/unified/20190407.223135 submit/tizen/20190405.073541
authorDongwoo Lee <dwoo08.lee@samsung.com>
Mon, 25 Mar 2019 05:59:40 +0000 (14:59 +0900)
committerDongwoo Lee <dwoo08.lee@samsung.com>
Fri, 5 Apr 2019 01:53:59 +0000 (10:53 +0900)
This patch renames files and functions which including tw2 to
those of tw3.

Change-Id: Ic7f74877ed7cbbc89d7e970443a977c1be0cd71f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
CMakeLists.txt
packaging/pass-hal-tw3.manifest [moved from packaging/pass-hal-tw2.manifest with 100% similarity]
packaging/pass-hal-tw3.spec [moved from packaging/pass-hal-tw2.spec with 94% similarity]
src/cpu/cpu.c
src/memory/memory.c
src/nonstandard/nonstandard.c

index 57e1e73..63a158d 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(pass-hal-tw2 C)
+PROJECT(pass-hal-tw3 C)
 
 SET(CMAKE_VERBOSE_MAKEFILE ON)
 
similarity index 94%
rename from packaging/pass-hal-tw2.spec
rename to packaging/pass-hal-tw3.spec
index b2266d1..d4c86e6 100644 (file)
@@ -1,8 +1,8 @@
 %define version 1.0.0
 %define release 1
 
-Name:       pass-hal-tw2
-Summary:    PASS hal for tw2
+Name:       pass-hal-tw3
+Summary:    PASS hal for tw3
 Version:    %{version}
 Release:    %{release}
 Group:      System/Hardware Adaptation
@@ -24,7 +24,7 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:         pkgconfig(pass-hal-devel)
 
 %description
-PASS hal for tw2
+PASS hal for tw3
 
 %prep
 %setup -q
index 33d7cfa..3eea31d 100644 (file)
@@ -42,7 +42,7 @@
 
 #define CPUFREQ_PMQOS_REQUEST_UNLOCK           -1
 
-static int tw2_dvfs_get_curr_freq(char *res_name)
+static int tw3_dvfs_get_curr_freq(char *res_name)
 {
        char path[PATH_MAX];
        int freq, ret;
@@ -62,7 +62,7 @@ static int tw2_dvfs_get_curr_freq(char *res_name)
        return freq;
 }
 
-static int tw2_dvfs_get_min_freq(char *res_name)
+static int tw3_dvfs_get_min_freq(char *res_name)
 {
        char path[PATH_MAX];
        int min_freq;
@@ -82,7 +82,7 @@ static int tw2_dvfs_get_min_freq(char *res_name)
        return min_freq;
 }
 
-static int tw2_dvfs_set_min_freq(char *res_name, int freq)
+static int tw3_dvfs_set_min_freq(char *res_name, int freq)
 {
        char path[PATH_MAX];
        int ret;
@@ -101,7 +101,7 @@ static int tw2_dvfs_set_min_freq(char *res_name, int freq)
        return 0;
 }
 
-static int tw2_dvfs_get_max_freq(char *res_name)
+static int tw3_dvfs_get_max_freq(char *res_name)
 {
        char path[PATH_MAX];
        int max_freq;
@@ -121,7 +121,7 @@ static int tw2_dvfs_get_max_freq(char *res_name)
        return max_freq;
 }
 
-static int tw2_dvfs_set_max_freq(char *res_name, int freq)
+static int tw3_dvfs_set_max_freq(char *res_name, int freq)
 {
        char path[PATH_MAX];
        int ret;
@@ -140,21 +140,21 @@ static int tw2_dvfs_set_max_freq(char *res_name, int freq)
        return 0;
 }
 
-static struct pass_resource_dvfs_ops tw2_cpu_dvfs_ops =  {
+static struct pass_resource_dvfs_ops tw3_cpu_dvfs_ops =  {
        .get_curr_governor = NULL,
        .set_curr_governor = NULL,
        .get_avail_governor = NULL,
-       .get_curr_freq = tw2_dvfs_get_curr_freq,
-       .get_min_freq = tw2_dvfs_get_min_freq,
-       .set_min_freq = tw2_dvfs_set_min_freq,
-       .get_max_freq = tw2_dvfs_get_max_freq,
-       .set_max_freq = tw2_dvfs_set_max_freq,
+       .get_curr_freq = tw3_dvfs_get_curr_freq,
+       .get_min_freq = tw3_dvfs_get_min_freq,
+       .set_min_freq = tw3_dvfs_set_min_freq,
+       .get_max_freq = tw3_dvfs_get_max_freq,
+       .set_max_freq = tw3_dvfs_set_max_freq,
        .get_up_threshold = NULL,
        .set_up_threshold = NULL,
        .get_load_table = NULL,
 };
 
-static int tw2_hotplug_get_online_min_num(char *res_name)
+static int tw3_hotplug_get_online_min_num(char *res_name)
 {
        char path[PATH_MAX];
        int online_min_num;
@@ -174,7 +174,7 @@ static int tw2_hotplug_get_online_min_num(char *res_name)
        return online_min_num;
 }
 
-static int tw2_hotplug_set_online_min_num(char *res_name, int num)
+static int tw3_hotplug_set_online_min_num(char *res_name, int num)
 {
        char path[PATH_MAX];
        int ret;
@@ -194,7 +194,7 @@ static int tw2_hotplug_set_online_min_num(char *res_name, int num)
        return 0;
 }
 
-static int tw2_hotplug_get_online_max_num(char *res_name)
+static int tw3_hotplug_get_online_max_num(char *res_name)
 {
        char path[PATH_MAX];
        int online_max_num;
@@ -214,7 +214,7 @@ static int tw2_hotplug_get_online_max_num(char *res_name)
        return online_max_num;
 }
 
-static int tw2_hotplug_set_online_max_num(char *res_name, int num)
+static int tw3_hotplug_set_online_max_num(char *res_name, int num)
 {
        char path[PATH_MAX];
        int ret;
@@ -233,16 +233,16 @@ static int tw2_hotplug_set_online_max_num(char *res_name, int num)
 
        return 0;
 }
-static struct pass_resource_hotplug_ops tw2_cpu_hotplug_ops = {
+static struct pass_resource_hotplug_ops tw3_cpu_hotplug_ops = {
        .get_online_state = NULL,
        .set_online_state = NULL,
-       .get_online_min_num = tw2_hotplug_get_online_min_num,
-       .set_online_min_num = tw2_hotplug_set_online_min_num,
-       .get_online_max_num = tw2_hotplug_get_online_max_num,
-       .set_online_max_num = tw2_hotplug_set_online_max_num,
+       .get_online_min_num = tw3_hotplug_get_online_min_num,
+       .set_online_min_num = tw3_hotplug_set_online_min_num,
+       .get_online_max_num = tw3_hotplug_get_online_max_num,
+       .set_online_max_num = tw3_hotplug_set_online_max_num,
 };
 
-static int tw2_cpu_get_temp(char *res_thermal_name)
+static int tw3_cpu_get_temp(char *res_thermal_name)
 {
        char path[PATH_MAX + 1];
        char buf[PATH_MAX + 1];
@@ -268,12 +268,12 @@ static int tw2_cpu_get_temp(char *res_thermal_name)
        return temp;
 }
 
-static struct pass_resource_tmu_ops tw2_cpu_tmu_ops = {
-       .get_temp = tw2_cpu_get_temp,
+static struct pass_resource_tmu_ops tw3_cpu_tmu_ops = {
+       .get_temp = tw3_cpu_get_temp,
        .get_policy = NULL,
 };
 
-static int tw2_cpu_open(char *res_name, struct pass_resource_info *info,
+static int tw3_cpu_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_cpu *cpu_res;
@@ -287,16 +287,16 @@ static int tw2_cpu_open(char *res_name, struct pass_resource_info *info,
                return -ENOMEM;
 
        cpu_res->common.info = info;
-       cpu_res->dvfs = tw2_cpu_dvfs_ops;
-       cpu_res->hotplug = tw2_cpu_hotplug_ops;
-       cpu_res->tmu = tw2_cpu_tmu_ops;
+       cpu_res->dvfs = tw3_cpu_dvfs_ops;
+       cpu_res->hotplug = tw3_cpu_hotplug_ops;
+       cpu_res->tmu = tw3_cpu_tmu_ops;
 
        *common = (struct pass_resource_common *) cpu_res;
 
        return 0;
 }
 
-static int tw2_cpu_close(char *res_name, struct pass_resource_common *common)
+static int tw3_cpu_close(char *res_name, struct pass_resource_common *common)
 {
        struct pass_resource_cpu *cpu_res;
        int ret = 0;
@@ -307,7 +307,7 @@ static int tw2_cpu_close(char *res_name, struct pass_resource_common *common)
        cpu_res = (struct pass_resource_cpu *) common;
 
        /*
-        * tw2 has weird pmqos sysfs node, thus we cannot apply save/restore
+        * tw3 has weird pmqos sysfs node, thus we cannot apply save/restore
         * feature as pass-hal-standard does. Instead of using standard
         * interface, we manually restore the each resource state; pmqos
         * request is unlocked by passing argument '-1' first, and resource
@@ -357,6 +357,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_CPU_ID,
        .name = PASS_RESOURCE_CPU_NAME,
-       .open = tw2_cpu_open,
-       .close = tw2_cpu_close,
+       .open = tw3_cpu_open,
+       .close = tw3_cpu_close,
 };
index 997a2d5..c470501 100644 (file)
@@ -27,7 +27,7 @@
 
 #define FAULT_AROUND_BYTES_PATH                "/sys/kernel/debug/fault_around_bytes"
 
-static int tw2_memory_get_fault_around_bytes(char *res_name)
+static int tw3_memory_get_fault_around_bytes(char *res_name)
 {
        int ret, fault_around_bytes;
 
@@ -41,7 +41,7 @@ static int tw2_memory_get_fault_around_bytes(char *res_name)
        return fault_around_bytes;
 }
 
-static int tw2_memory_set_fault_around_bytes(char *res_name,
+static int tw3_memory_set_fault_around_bytes(char *res_name,
                                                int fault_around_bytes)
 {
        int ret;
@@ -56,7 +56,7 @@ static int tw2_memory_set_fault_around_bytes(char *res_name,
        return 0;
 }
 
-static int tw2_memory_open(char *res_name, struct pass_resource_info *info,
+static int tw3_memory_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_memory *res;
@@ -69,15 +69,15 @@ static int tw2_memory_open(char *res_name, struct pass_resource_info *info,
                return -ENOMEM;
 
        res->common.info = info;
-       res->get_fault_around_bytes = tw2_memory_get_fault_around_bytes;
-       res->set_fault_around_bytes = tw2_memory_set_fault_around_bytes;
+       res->get_fault_around_bytes = tw3_memory_get_fault_around_bytes;
+       res->set_fault_around_bytes = tw3_memory_set_fault_around_bytes;
 
        *common = (struct pass_resource_common *)res;
 
        return 0;
 }
 
-static int tw2_memory_close(char *res_name, struct pass_resource_common *common)
+static int tw3_memory_close(char *res_name, struct pass_resource_common *common)
 {
        if (!common)
                return -EINVAL;
@@ -91,6 +91,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_MEMORY_ID,
        .name = PASS_RESOURCE_MEMORY_NAME,
-       .open = tw2_memory_open,
-       .close = tw2_memory_close,
+       .open = tw3_memory_open,
+       .close = tw3_memory_close,
 };
index a897cb7..0aa620a 100644 (file)
@@ -31,7 +31,7 @@
 
 #define SCENARIO_INFO_SOCKET_PATH      "/dev/socket/scenario_info"
 
-static int tw2_set_pmqos_data(char *res_name, void *data)
+static int tw3_set_pmqos_data(char *res_name, void *data)
 {
        struct sockaddr_un addr;
        int socket_fd, ret;
@@ -65,10 +65,10 @@ static int tw2_set_pmqos_data(char *res_name, void *data)
        return ret;
 }
 
-static int tw2_set_pmqos_data_nop(char *res_name, void *data)
+static int tw3_set_pmqos_data_nop(char *res_name, void *data)
 {
        /*
-        * The tw2_set_pmqos_data function is required to send the PMQoS
+        * The tw3_set_pmqos_data function is required to send the PMQoS
         * scenario information to the socket interface of the TRM and it
         * is optional, which means that this HAL for nonstandard should work
         * without TRM. For this reason, if there is no unix domain socket file
@@ -78,7 +78,7 @@ static int tw2_set_pmqos_data_nop(char *res_name, void *data)
        return 0;
 }
 
-static int tw2_nonstandard_open(char *res_name, struct pass_resource_info *info,
+static int tw3_nonstandard_open(char *res_name, struct pass_resource_info *info,
                struct pass_resource_common **common)
 {
        struct pass_resource_nonstandard *nonstandard_res;
@@ -96,16 +96,16 @@ static int tw2_nonstandard_open(char *res_name, struct pass_resource_info *info,
 
        ret = access(SCENARIO_INFO_SOCKET_PATH, F_OK);
        if (!ret)
-               nonstandard_res->set_pmqos_data = tw2_set_pmqos_data;
+               nonstandard_res->set_pmqos_data = tw3_set_pmqos_data;
        else
-               nonstandard_res->set_pmqos_data = tw2_set_pmqos_data_nop;
+               nonstandard_res->set_pmqos_data = tw3_set_pmqos_data_nop;
 
        *common = (struct pass_resource_common *) nonstandard_res;
 
        return 0;
 }
 
-static int tw2_nonstandard_close(char *res_name, struct pass_resource_common *common)
+static int tw3_nonstandard_close(char *res_name, struct pass_resource_common *common)
 {
        if (!res_name || !common)
                return -EINVAL;
@@ -119,6 +119,6 @@ HAL_MODULE_STRUCTURE = {
        .magic = HAL_INFO_TAG,
        .id = PASS_RESOURCE_NONSTANDARD_ID,
        .name = PASS_RESOURCE_NONSTANDARD_NAME,
-       .open = tw2_nonstandard_open,
-       .close = tw2_nonstandard_close,
+       .open = tw3_nonstandard_open,
+       .close = tw3_nonstandard_close,
 };