mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
dvfs: add dvfs_get_regulator() function
This commit is contained in:
@@ -282,18 +282,22 @@ static void dvfs_vd_get_regulator_mode_info(struct vd_node *vd)
|
||||
}
|
||||
}
|
||||
}
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -167,6 +167,7 @@ struct cpufreq_frequency_table *dvfs_get_freq_volt_table(struct dvfs_node *clk_d
|
||||
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
|
||||
@@ -189,6 +190,7 @@ static inline struct cpufreq_frequency_table *dvfs_get_freq_volt_table(struct dv
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user