return hotplug->set_online_state(res_name, cpu, on);
}
+int pass_get_online_min_num(struct pass_resource *res)
+{
+ struct pass_resource_hotplug_ops *hotplug;
+ char *res_name;
+ int id;
+
+ if (!res)
+ return -EINVAL;
+
+ res_name = res->cdata.res_name;
+ id = res->cdata.res_type;
+
+ hotplug = get_hotplug(res, id);
+ if (!hotplug)
+ return -EINVAL;
+
+ if ((!hotplug->get_online_min_num) || (!res_name))
+ return -EINVAL;
+
+ return hotplug->get_online_min_num(res_name);
+}
+
+int pass_set_online_min_num(struct pass_resource *res, int num)
+{
+ struct pass_resource_hotplug_ops *hotplug;
+ char *res_name;
+ int id;
+
+ if ((!res) || (num < 0))
+ return -EINVAL;
+
+ res_name = res->cdata.res_name;
+ id = res->cdata.res_type;
+
+ hotplug = get_hotplug(res, id);
+ if (!hotplug)
+ return -EINVAL;
+
+ if ((!hotplug->set_online_min_num) || (!res_name))
+ return -EINVAL;
+
+ return hotplug->set_online_min_num(res_name, num);
+}
+
+int pass_get_online_max_num(struct pass_resource *res)
+{
+ struct pass_resource_hotplug_ops *hotplug;
+ char *res_name;
+ int id;
+
+ if (!res)
+ return -EINVAL;
+
+ res_name = res->cdata.res_name;
+ id = res->cdata.res_type;
+
+ hotplug = get_hotplug(res, id);
+ if (!hotplug)
+ return -EINVAL;
+
+ if ((!hotplug->get_online_max_num) || (!res_name))
+ return -EINVAL;
+
+ return hotplug->get_online_max_num(res_name);
+}
+
+int pass_set_online_max_num(struct pass_resource *res, int num)
+{
+ struct pass_resource_hotplug_ops *hotplug;
+ char *res_name;
+ int id;
+
+ if ((!res) || (num < 0))
+ return -EINVAL;
+
+ res_name = res->cdata.res_name;
+ id = res->cdata.res_type;
+
+ hotplug = get_hotplug(res, id);
+ if (!hotplug)
+ return -EINVAL;
+
+ if ((!hotplug->set_online_max_num) || (!res_name))
+ return -EINVAL;
+
+ return hotplug->set_online_max_num(res_name, num);
+}
+
/* Get the temperature and thermal policy for Thermal resource. */
int pass_get_temp(struct pass_resource *res)
{
/* Get and set online state of cpu. */
int pass_get_online_state(struct pass_resource *res, int cpu);
int pass_set_online_state(struct pass_resource *res, int cpu, int on);
+/* Get and set the minimum number of online CPUs */
+int pass_get_online_min_num(struct pass_resource *res);
+int pass_set_online_min_num(struct pass_resource *res, int num);
+/* Get and set the maximum number of online CPUs */
+int pass_get_online_max_num(struct pass_resource *res);
+int pass_set_online_max_num(struct pass_resource *res, int num);
/* Get the temperature and policy of thermal unit on specific h/w. */
int pass_get_temp(struct pass_resource *res);