@@ -34,6 +34,9 @@ static HLIST_HEAD(clk_root_list);
static HLIST_HEAD(clk_orphan_list);
static LIST_HEAD(clk_notifier_list);
+static int __clk_notify(struct clk *clk, unsigned long msg,
+ unsigned long old_rate, unsigned long new_rate);
+
/*** locking ***/
static void clk_prepare_lock(void)
{
@@ -697,6 +700,9 @@ void __clk_unprepare(struct clk *clk)
if (clk->ops->unprepare)
clk->ops->unprepare(clk->hw);
+ /* send out notifier for dvfs */
+ __clk_notify(clk, POST_RATE_CHANGE, clk->rate, 0);
+
__clk_unprepare(clk->parent);
}
@@ -738,6 +744,9 @@ int __clk_prepare(struct clk *clk)
return ret;
}
}
+
+ /* send out notifier for dvfs */
+ __clk_notify(clk, PRE_RATE_CHANGE, 0, clk->rate);
}
clk->prepare_count++;