dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_curr_governor)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_curr_governor(res->config_data.res_name, governor);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->set_curr_governor)
- return -EINVAL;
+ return -ENODEV;
return dvfs->set_curr_governor(res->config_data.res_name, governor);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_curr_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_curr_freq(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_min_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_min_freq(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->set_min_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->set_min_freq(res->config_data.res_name, freq);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_max_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_max_freq(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->set_max_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->set_max_freq(res->config_data.res_name, freq);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_available_min_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_available_min_freq(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_available_max_freq)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_available_max_freq(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->get_up_threshold)
- return -EINVAL;
+ return -ENODEV;
return dvfs->get_up_threshold(res->config_data.res_name);
}
dvfs = get_dvfs(res, res->config_data.res_type);
if (!dvfs)
- return -EINVAL;
+ return -EPERM;
if (!dvfs->set_up_threshold)
- return -EINVAL;
+ return -ENODEV;
return dvfs->set_up_threshold(res->config_data.res_name, up_threshold);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->get_online_state)
- return -EINVAL;
+ return -ENODEV;
return hotplug->get_online_state(res->config_data.res_name, cpu);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->set_online_state)
- return -EINVAL;
+ return -ENODEV;
return hotplug->set_online_state(res->config_data.res_name, cpu, on);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->get_online_min_num)
- return -EINVAL;
+ return -ENODEV;
return hotplug->get_online_min_num(res->config_data.res_name);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->set_online_min_num)
- return -EINVAL;
+ return -ENODEV;
return hotplug->set_online_min_num(res->config_data.res_name, num);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->get_online_max_num)
- return -EINVAL;
+ return -ENODEV;
return hotplug->get_online_max_num(res->config_data.res_name);
}
hotplug = get_hotplug(res, res->config_data.res_type);
if (!hotplug)
- return -EINVAL;
+ return -EPERM;
if (!hotplug->set_online_max_num)
- return -EINVAL;
+ return -ENODEV;
return hotplug->set_online_max_num(res->config_data.res_name, num);
}
tmu = get_tmu(res, res->config_data.res_type);
if (!tmu)
- return -EINVAL;
+ return -EPERM;
if (!tmu->get_temp)
- return -EINVAL;
+ return -ENODEV;
/*
* In the case of the HAL TMU ops, res_thermal_name is used
tmu = get_tmu(res, res->config_data.res_type);
if (!tmu)
- return -EINVAL;
+ return -EPERM;
if (!tmu->get_policy)
- return -EINVAL;
+ return -ENODEV;
/*
* In the case of the HAL TMU ops, res_thermal_name is used
memory = res->hal.memory;
break;
default:
- return -EINVAL;
+ return -EPERM;
}
if (!memory->set_fault_around_bytes)
- return -EINVAL;
+ return -ENODEV;
return memory->set_fault_around_bytes(res->config_data.res_name, fault_around_bytes);
}
memory = res->hal.memory;
break;
default:
- return -EINVAL;
+ return -EPERM;
}
if (!memory->get_fault_around_bytes)
- return -EINVAL;
+ return -ENODEV;
return memory->get_fault_around_bytes(res->config_data.res_name);
}
{
struct pass_resource_nonstandard *nonstandard = NULL;
- if (!res)
+ if (!res || !data)
return -EINVAL;
switch (res->config_data.res_type) {
nonstandard = (res->hal.nonstandard);
break;
default:
- return -EINVAL;
+ return -EPERM;
}
- if (!nonstandard->set_pmqos_data || !data)
- return -EINVAL;
+ if (!nonstandard->set_pmqos_data)
+ return -ENODEV;
return nonstandard->set_pmqos_data(res->config_data.res_name, data);
}