Loading drivers/clk/qcom/vdd-class.c +8 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ #include "vdd-class.h" #include "clk-regmap.h" static DEFINE_MUTEX(vdd_lock); /* * Aggregate the vdd_class level votes and call regulator framework functions * to enforce the highest vote. Loading Loading @@ -87,12 +89,15 @@ int clk_vote_vdd_level(struct clk_vdd_class_data *vdd_data, int level) if (level >= vdd_class->num_levels) return -EINVAL; mutex_lock(&vdd_lock); vdd_class->level_votes[level]++; ret = clk_aggregate_vdd(vdd_class); if (ret) vdd_class->level_votes[level]--; mutex_unlock(&vdd_lock); return ret; } EXPORT_SYMBOL(clk_vote_vdd_level); Loading Loading @@ -122,12 +127,15 @@ int clk_unvote_vdd_level(struct clk_vdd_class_data *vdd_data, int level) return -EINVAL; } mutex_lock(&vdd_lock); vdd_class->level_votes[level]--; ret = clk_aggregate_vdd(vdd_class); if (ret) vdd_class->level_votes[level]++; mutex_unlock(&vdd_lock); return ret; } EXPORT_SYMBOL(clk_unvote_vdd_level); Loading Loading
drivers/clk/qcom/vdd-class.c +8 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,8 @@ #include "vdd-class.h" #include "clk-regmap.h" static DEFINE_MUTEX(vdd_lock); /* * Aggregate the vdd_class level votes and call regulator framework functions * to enforce the highest vote. Loading Loading @@ -87,12 +89,15 @@ int clk_vote_vdd_level(struct clk_vdd_class_data *vdd_data, int level) if (level >= vdd_class->num_levels) return -EINVAL; mutex_lock(&vdd_lock); vdd_class->level_votes[level]++; ret = clk_aggregate_vdd(vdd_class); if (ret) vdd_class->level_votes[level]--; mutex_unlock(&vdd_lock); return ret; } EXPORT_SYMBOL(clk_vote_vdd_level); Loading Loading @@ -122,12 +127,15 @@ int clk_unvote_vdd_level(struct clk_vdd_class_data *vdd_data, int level) return -EINVAL; } mutex_lock(&vdd_lock); vdd_class->level_votes[level]--; ret = clk_aggregate_vdd(vdd_class); if (ret) vdd_class->level_votes[level]++; mutex_unlock(&vdd_lock); return ret; } EXPORT_SYMBOL(clk_unvote_vdd_level); Loading