clk: versatile: add min/max rate boundaries for vexpress osc clock
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 10 Nov 2017 16:06:57 +0000 (16:06 +0000)
committerStephen Boyd <sboyd@kernel.org>
Fri, 16 Mar 2018 22:29:54 +0000 (15:29 -0700)
Clock framework has a provider API(clk_hw_set_rate_range) to set the
min/max rate of a clock. Use the same to set the boundaries for the
vexpress osc clock.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/versatile/clk-vexpress-osc.c

index e7a868b..d3b5af2 100644 (file)
@@ -104,6 +104,7 @@ static int vexpress_osc_probe(struct platform_device *pdev)
                return PTR_ERR(clk);
 
        of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, clk);
+       clk_hw_set_rate_range(&osc->hw, osc->rate_min, osc->rate_max);
 
        dev_dbg(&pdev->dev, "Registered clock '%s'\n", init.name);