#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;
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;
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;
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;
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;
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;
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;
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;
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;
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];
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;
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;
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
.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,
};
#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;
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;
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;
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;
.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,
};
#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;
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
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;
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;
.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,
};