Hi! Not only it does string parsing in generc code, it pushes it to architectures, too. Ouch. > +static char *pwr_param_names_list = "cpu_vltg dpll cpu tc per dsp dspmmu lcd "; ... > +#define PWR_PARAM_SET 1 > +#define PWR_PARAM_GET 2 > +/* FIXME: very temporary implementation, just to prove the concept !! */ > +static int > +process_pwr_param(struct pm_core_point *opt, int op, char *param_name, > + int va_arg) > +{ > + if (strcmp(param_name, "cpu_vltg") == 0) { > + if (op == PWR_PARAM_SET) > + opt->cpu_vltg = va_arg; > + else if (opt != NULL) > + *(int *)va_arg = opt->cpu_vltg; > + else if (unlikely((*(int *)va_arg = get_vtg("v1")) <= 0)) > + return -EINVAL; > + > + return 0; > + } > + > + if (strcmp(param_name, "dpll") == 0) { > + if (op == PWR_PARAM_SET) > + opt->dpll = va_arg; > + else if (opt != NULL) > + *(int *)va_arg = opt->dpll; > + else if ((*(int *)va_arg = get_clk_rate("ck_dpll1")) <= 0) > + return -EINVAL; > + > + return 0; > + } > + > + if (strcmp(param_name, "cpu") == 0) { > + if (op == PWR_PARAM_SET) > + opt->cpu = va_arg; > + else if (opt != NULL) > + *(int *)va_arg = opt->cpu; > + else if ((*(int *)va_arg = get_clk_rate("arm_ck")) <= 0) > + return -EINVAL; > + > + return 0; > + } > + > + /* FIXME: more parameters to process */ > + > + return -EINVAL; > +} It certainly tells me I do not like the concept :-(. -- Thanks for all the (sleeping) penguins.