summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/clk/clk.c3
-rw-r--r--include/linux/clk-provider.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 5b0f41868b42..0c0124c4eeeb 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1788,6 +1788,9 @@ static void clk_change_rate(struct clk_core *clk)
if (clk->notifier_count && old_rate != clk->rate)
__clk_notify(clk, POST_RATE_CHANGE, old_rate, clk->rate);
+ if (clk->flags & CLK_RECALC_NEW_RATES)
+ (void)clk_calc_new_rates(clk, clk->new_rate);
+
/*
* Use safe iteration, as change_rate can actually swap parents
* for certain clock types.
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index df695313f975..82f59ca8188a 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -31,6 +31,7 @@
#define CLK_GET_RATE_NOCACHE BIT(6) /* do not use the cached clk rate */
#define CLK_SET_RATE_NO_REPARENT BIT(7) /* don't re-parent on rate change */
#define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */
+#define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */
struct clk_hw;
struct clk_core;