clk: twl6040: Register the clock as of_clk_provider
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 30 May 2016 08:55:10 +0000 (11:55 +0300)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 15 Aug 2016 19:09:52 +0000 (12:09 -0700)
In order ot be able to use the pdmclk clock via DT it need to be registered
as of_clk_provide.
Since the twl6040 clock driver does not have it's own DT node, use the
parent's node for registering.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-twl6040.c

index e167e0bbaff52f1bab2cb8f12d51ae38ec1e0f1c..6a2dbe6a16271bd752a3dfd2f51f1e5dcdf4eceb 100644 (file)
@@ -95,7 +95,8 @@ static int twl6040_clk_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, clkdata);
 
-       return 0;
+       return of_clk_add_provider(pdev->dev.parent->of_node,
+                                  of_clk_src_simple_get, clkdata->clk);
 }
 
 static struct platform_driver twl6040_clk_driver = {