Messages in this thread | | | Date | Sat, 18 Aug 2012 20:52:44 +0200 | From | Wolfram Sang <> | Subject | Re: [PATCH REBASE 2/2] i2c: tegra: dynamically control fast clk |
| |
On Sat, Aug 18, 2012 at 12:32:35AM +0530, Laxman Dewangan wrote: > Tegra I2C driver enables the fast clock during initialization > and does not disable till driver removed. > Enable this clock before transfer and disable after transfer done. > > Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Except that this patch is affected from the flaw of the previous patch, it looks good to me.
> - clk_prepare_enable(i2c_dev->clk); > + tegra_i2c_clock_enable(i2c_dev);
This should be div_clk.
> for (i = 0; i < num; i++) { > enum msg_end_type end_type = MSG_END_STOP; > if (i < (num - 1)) { > @@ -597,7 +621,7 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], > if (ret) > break; > } > - clk_disable_unprepare(i2c_dev->div_clk); > + tegra_i2c_clock_disable(i2c_dev); > return ret ?: i;
If that is fixed, you can add
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
-- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [unhandled content-type:application/pgp-signature] | |