]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
clk: wm831x: fix usleep_range with bad range
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 12 Dec 2016 07:40:09 +0000 (08:40 +0100)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 10 Jan 2017 00:06:41 +0000 (16:06 -0800)
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 f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-wm831x.c

index 0621fbfb4bebfd548b21f62e7320f1bab2294b48..a47960aacfa52c30749787ea3cb1a3d35b0576d0 100644 (file)
@@ -97,7 +97,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;
 }