Skip to contentSkip to conversation

i2c: tegra: use clk_disable_unprepare in place of clk_disable

PATCH In review Laxman Dewangan 2 participants 8 messages Jun 20, 2012 – Jun 27, 2012

Subsystems (3)
lore
Share & tools
lore

Laxman Dewangan

author maintainer
#0 lore raw

PATCH 1/1 i2c: tegra: use clk_disable_unprepare in place of clk_disable

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

---
 drivers/i2c/busses/i2c-tegra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-tegra.c +1 -1
index 00cdc10..d071cf0 100644
@@ -696,7 +696,7 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 	ret = i2c_add_numbered_adapter(&i2c_dev->adapter);
 	if (ret) {
 		dev_err(&pdev->dev, "Failed to add I2C adapter\n");
-		clk_disable(i2c_dev->i2c_clk);
+		clk_disable_unprepare(i2c_dev->i2c_clk);
 		return ret;
 	}
 
Signature · 1 line
1.7.1.1
#1 lore raw
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

Wolfram,

Since I've taken the other I2C patch on this topic through the Tegra tree (in order to satisfy any common clock dependencies there), I believe I should take this one patch through the Tegra tree too.

I see no reason not to take the second patch in the series through the I2C tree though.

Do you agree?

#2 lore raw
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as a series.

author maintainer
#3 lore raw

Stephen,

Quoted 10 lines · Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as a series.

so are you taking care of this patch or do I need to send the patch based on your tree in place of linux-next?

#4 lore raw
Quoted 8 lines · Laxman Dewangan

Stephen,

Quoted 5 lines · Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

Quoted 8 lines
Quoted 5 lines

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as a series.

so are you taking care of this patch or do I need to send the patch based on your tree in place of linux-next?

Yes, this patch should be applied through the Tegra tree, since it will be a dependency of the common clock framework switchover there, which I hope to take place this kernel cycle.

I did just attempt to apply this patch to the for-3.6/common-clk branch, but it doesn't apply:-( Could you please rebase and resend. Thanks.

author maintainer
#5 lore raw
Quoted 14 lines · Stephen Warren
Quoted 13 lines · Laxman Dewangan

Stephen,

Quoted 10 lines · Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as a series.

Quoted 8 lines
Quoted 2 lines

so are you taking care of this patch or do I need to send the patch based on your tree in place of linux-next?

Yes, this patch should be applied through the Tegra tree, since it will be a dependency of the common clock framework switchover there, which I hope to take place this kernel cycle.

I did just attempt to apply this patch to the for-3.6/common-clk branch, but it doesn't apply:-( Could you please rebase and resend. Thanks.

Looked at your common_clk branch and the related code is not there. The clk_disable() in the particular case is introduced by change
i2c: tegra: make all resource allocation through devm_* which is not in your branch.

Then later Prashant post the change as
i2c: tegra: Add clk_prepare/clk_unprepare
and it does not accounted for the above patch.

So none of your local tree will have this issue.

You need to pull some of the change from Wofram's tree to you commn-clk to fix the issue. Suggest to pull the change
i2c: tegra: make all resource allocation through devm_*
i2c: tegra: support for I2C_M_NOSTART functionality
i2c: tegra: add PROTOCOL_MANGLING as supported functionality.
i2c: tegra: make sure register writes completes

#6 lore raw
Quoted 30 lines · Laxman Dewangan
Quoted 15 lines · Stephen Warren
Quoted 14 lines · Laxman Dewangan

Stephen,

Quoted 11 lines · Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as
a series.

Quoted 8 lines
Quoted 2 lines

so are you taking care of this patch or do I need to send the patch based on your tree in place of linux-next?

Yes, this patch should be applied through the Tegra tree, since it will be a dependency of the common clock framework switchover there, which I hope to take place this kernel cycle.

I did just attempt to apply this patch to the for-3.6/common-clk branch, but it doesn't apply:-( Could you please rebase and resend. Thanks.

Looked at your common_clk branch and the related code is not there. The clk_disable() in the particular case is introduced by change
i2c: tegra: make all resource allocation through devm_* which is not in your branch.

Quoted 5 lines

Then later Prashant post the change as
i2c: tegra: Add clk_prepare/clk_unprepare
and it does not accounted for the above patch.

So none of your local tree will have this issue.

OK. In that case, it's best if this patch goes through the I2C tree since that's where the code is that it's modifying. This might not be optimal for runtime git bisection depending on the order Linus ends up merging things, but it's probably as good as we can do without inter-twining the I2C and Tegra trees a lot.

author maintainer
#7 lore raw
Quoted 34 lines · Stephen Warren
Quoted 33 lines · Laxman Dewangan
Quoted 15 lines · Stephen Warren
Quoted 14 lines · Laxman Dewangan

Stephen,

Quoted 11 lines · Stephen Warren
Quoted 4 lines · Stephen Warren
Quoted 3 lines · Laxman Dewangan

Use clk_disable_unprepare() inplace of clk_disable(). This was missed as part of moving clock enable/disable to prepare/unprepare for using the common clock framework.

...

Quoted 2 lines

I see no reason not to take the second patch in the series through the I2C tree though.

Uggh. Ignore that paragraph - the other patch was sent separately not as
a series.

Quoted 8 lines
Quoted 2 lines

so are you taking care of this patch or do I need to send the patch based on your tree in place of linux-next?

Yes, this patch should be applied through the Tegra tree, since it will be a dependency of the common clock framework switchover there, which I hope to take place this kernel cycle.

I did just attempt to apply this patch to the for-3.6/common-clk branch, but it doesn't apply:-( Could you please rebase and resend. Thanks.

Looked at your common_clk branch and the related code is not there. The clk_disable() in the particular case is introduced by change
i2c: tegra: make all resource allocation through devm_* which is not in your branch.

Then later Prashant post the change as
i2c: tegra: Add clk_prepare/clk_unprepare
and it does not accounted for the above patch.

Quoted 6 lines
Quoted 1 line

So none of your local tree will have this issue.

OK. In that case, it's best if this patch goes through the I2C tree since that's where the code is that it's modifying. This might not be optimal for runtime git bisection depending on the order Linus ends up merging things, but it's probably as good as we can do without inter-twining the I2C and Tegra trees a lot.

Then it can go Wolfram's tree along with other patch
i2c: tegra: remove unused member variable.

as some of previous i2c patches are in his tree.