From: Marek Belisko Date: Fri, 3 May 2013 05:53:23 +0000 (+0200) Subject: clk: si5351: Set initial clkout rate when defined in platform data. X-Git-Tag: accepted/tizen/common/20141203.182822~2143^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6532cb71fb31436b8d31818a056f45b8f95dfb31;p=platform%2Fkernel%2Flinux-arm64.git clk: si5351: Set initial clkout rate when defined in platform data. clock-frequency property from platform data was read but never used. Apply defined rate when clock is registered. Signed-off-by: Marek Belisko Acked-by: Sebastian Hesselbarth Signed-off-by: Mike Turquette [mturquette@linaro.org: add missing changelog] Cc: stable@kernel.org Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index cf39e53..24f5536 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1477,6 +1477,16 @@ static int si5351_i2c_probe(struct i2c_client *client, return -EINVAL; } drvdata->onecell.clks[n] = clk; + + /* set initial clkout rate */ + if (pdata->clkout[n].rate != 0) { + int ret; + ret = clk_set_rate(clk, pdata->clkout[n].rate); + if (ret != 0) { + dev_err(&client->dev, "Cannot set rate : %d\n", + ret); + } + } } ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get,