Skip to contentSkip to conversation

clk: si5351: Do not enable parent clocks on probe

PATCH Superseded Sergej Sawazki 2 participants 2 messages Feb 4, 2017 – Jul 21, 2017 Common clk

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: si5351: Do not enable parent clocks on probe

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 <[email protected]>
---
 drivers/clk/clk-si5351.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/clk-si5351.c +4 -4
index b051db4..f9eb590 100644
@@ -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;
 }
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · Sergej Sawazki

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 <[email protected]>

---

I'll bite after many months.

Quoted 8 lines
 drivers/clk/clk-si5351.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clk/clk-si5351.c +0 -0
index b051db4..f9eb590 100644

drivers/clk/clk-si5351.c static int si5351_i2c_probe(struct i2c_client *client, · line 1447

Quoted 8 lines
drivers/clk/clk-si5351.c +2 -2
@@ -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?

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project