Commit 84672b2c authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Ben Hutchings

clk: wm831x: fix usleep_range with bad range

commit ed784c53 upstream.

The delay here is not in atomic context and does not seem critical with
respect to precision, but usleep_range(min,max) with min==max results in
giving the timer subsystem no room to optimize uncritical delays. Fix
this by setting the range to 2000,3000 us.

Fixes: commit f05259a6 ("clk: wm831x: Add initial WM831x clock driver")
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent d7c195dc
......@@ -102,7 +102,8 @@ static int wm831x_fll_prepare(struct clk_hw *hw)
if (ret != 0)
dev_crit(wm831x->dev, "Failed to enable FLL: %d\n", ret);
usleep_range(2000, 2000);
/* wait 2-3 ms for new frequency taking effect */
usleep_range(2000, 3000);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment