diff mbox

clk: si5351: Do not enable parent clocks on probe

Message ID 1486239477-24720-1-git-send-email-ce3a@gmx.de (mailing list archive)
State Changes Requested
Delegated to: Stephen Boyd
Headers show

Commit Message

Sergej Sawazki Feb. 4, 2017, 8:17 p.m. UTC
The si5351 driver should not, by default, enable other clocks in
the tree. Let the clients decide when to enable the clocks.

Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
---
 drivers/clk/clk-si5351.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Stephen Boyd July 21, 2017, 9:41 p.m. UTC | #1
On 02/04, Sergej Sawazki wrote:
> The si5351 driver should not, by default, enable other clocks in
> the tree. Let the clients decide when to enable the clocks.
> 
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
> ---

I'll bite after many months.

>  drivers/clk/clk-si5351.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
> index b051db4..f9eb590 100644
> --- a/drivers/clk/clk-si5351.c
> +++ b/drivers/clk/clk-si5351.c
> @@ -1442,9 +1442,9 @@ static int si5351_i2c_probe(struct i2c_client *client,
>  	}
>  
>  	if (!IS_ERR(drvdata->pxtal))
> -		clk_prepare_enable(drvdata->pxtal);
> +		clk_prepare(drvdata->pxtal);
>  	if (!IS_ERR(drvdata->pclkin))
> -		clk_prepare_enable(drvdata->pclkin);
> +		clk_prepare(drvdata->pclkin);

Why isn't the prepare also removed?
diff mbox

Patch

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index b051db4..f9eb590 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -1442,9 +1442,9 @@  static int si5351_i2c_probe(struct i2c_client *client,
 	}
 
 	if (!IS_ERR(drvdata->pxtal))
-		clk_prepare_enable(drvdata->pxtal);
+		clk_prepare(drvdata->pxtal);
 	if (!IS_ERR(drvdata->pclkin))
-		clk_prepare_enable(drvdata->pclkin);
+		clk_prepare(drvdata->pclkin);
 
 	/* register xtal input clock gate */
 	memset(&init, 0, sizeof(init));
@@ -1617,9 +1617,9 @@  static int si5351_i2c_probe(struct i2c_client *client,
 
 err_clk:
 	if (!IS_ERR(drvdata->pxtal))
-		clk_disable_unprepare(drvdata->pxtal);
+		clk_unprepare(drvdata->pxtal);
 	if (!IS_ERR(drvdata->pclkin))
-		clk_disable_unprepare(drvdata->pclkin);
+		clk_unprepare(drvdata->pclkin);
 	return ret;
 }