[PATCH v7] i2c: rk3x: handle dynamic clock rate changes correctly
Wolfram Sang
wsa at the-dreams.de
Sat Nov 22 05:29:03 PST 2014
On Thu, Nov 20, 2014 at 10:26:50AM +0100, Max Schwarz wrote:
> The i2c input clock can change dynamically, e.g. on the RK3066 where
> pclk_i2c0 and pclk_i2c1 are connected to the armclk, which changes
> rate on cpu frequency scaling.
>
> Until now, we incorrectly called clk_get_rate() while holding the
> i2c->lock in rk3x_i2c_xfer() to adapt to clock rate changes.
> Thanks to Huang Tao for reporting this issue.
>
> Do it properly now using the clk notifier framework. The callback
> logic was taken from i2c-cadence.c.
>
> Also rename all misleading "i2c_rate" variables to "clk_rate", as they
> describe the *input* clk rate.
>
> Signed-off-by: Max Schwarz <max.schwarz at online.de>
> Tested-by: Max Schwarz <max.schwarz at online.de> on RK3188
> Tested-by: Doug Anderson <dianders at chromium.org> on RK3288
> Reviewed-by: Doug Anderson <dianders at chromium.org>
Applied to for-next, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20141122/2d2423eb/attachment.sig>
More information about the Linux-rockchip
mailing list