}
}
}
+#endif
-struct regulator *dvfs_get_regulator1(char *regulator_name)
+struct regulator *dvfs_get_regulator(char *regulator_name)
{
struct vd_node *vd;
+
+ mutex_lock(&rk_dvfs_mutex);
list_for_each_entry(vd, &rk_dvfs_tree, node) {
if (strcmp(regulator_name, vd->regulator_name) == 0) {
+ mutex_unlock(&rk_dvfs_mutex);
return vd->regulator;
}
}
+ mutex_unlock(&rk_dvfs_mutex);
return NULL;
}
-#endif
static int dvfs_get_rate_range(struct dvfs_node *clk_dvfs_node)
{
int rk_regist_vd(struct vd_node *vd);
int rk_regist_pd(struct pd_node *pd);
int rk_regist_clk(struct dvfs_node *clk_dvfs_node);
+struct regulator *dvfs_get_regulator(char *regulator_name);
int of_dvfs_init(void);
#else
static inline int rk_regist_vd(struct vd_node *vd){ return 0; };
static inline int rk_regist_pd(struct pd_node *pd){ return 0; };
static inline int rk_regist_clk(struct dvfs_node *clk_dvfs_node){ return 0; };
+struct regulator *dvfs_get_regulator(char *regulator_name){ return NULL; };
static inline int of_dvfs_init(void){ return 0; };
#endif