Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-09-02 Thread Stephen Warren
On 09/02/2014 05:56 AM, Wolfram Sang wrote: On Fri, Aug 15, 2014 at 10:18:15AM -0600, Stephen Warren wrote: On 08/15/2014 03:47 AM, Mikko Perttunen wrote: Currently the i2c-tegra bus driver prepares, enables and set_rates its clocks separately for each transfer. This causes locking problems whe

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-09-02 Thread Wolfram Sang
On Fri, Aug 15, 2014 at 10:18:15AM -0600, Stephen Warren wrote: > On 08/15/2014 03:47 AM, Mikko Perttunen wrote: > >Currently the i2c-tegra bus driver prepares, enables > >and set_rates its clocks separately for each transfer. > >This causes locking problems when doing I2C transfers > >from clock n

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Peter De Schrijver
On Fri, Aug 15, 2014 at 11:46:49PM +0200, Stephen Warren wrote: > On 08/15/2014 03:34 PM, Peter De Schrijver wrote: > > On Fri, Aug 15, 2014 at 09:45:46PM +0200, Peter De Schrijver wrote: > >> On Fri, Aug 15, 2014 at 08:07:01PM +0200, Stephen Warren wrote: > > However, the new code sets the clo

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Stephen Warren
On 08/15/2014 03:34 PM, Peter De Schrijver wrote: On Fri, Aug 15, 2014 at 09:45:46PM +0200, Peter De Schrijver wrote: On Fri, Aug 15, 2014 at 08:07:01PM +0200, Stephen Warren wrote: However, the new code sets the clock rate after the clock is prepared. I think the rate should be set first, then

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Peter De Schrijver
On Fri, Aug 15, 2014 at 09:45:46PM +0200, Peter De Schrijver wrote: > On Fri, Aug 15, 2014 at 08:07:01PM +0200, Stephen Warren wrote: > > >> However, the new code sets the clock rate after the clock is prepared. I > > >> think the rate should be set first, then the clock prepared. While this > > >>

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Peter De Schrijver
On Fri, Aug 15, 2014 at 08:07:01PM +0200, Stephen Warren wrote: > >> However, the new code sets the clock rate after the clock is prepared. I > >> think the rate should be set first, then the clock prepared. While this > >> likely doesn't apply to the Tegra clock controller, prepare() is allowed >

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Stephen Warren
On 08/15/2014 12:02 PM, Peter De Schrijver wrote: On Fri, Aug 15, 2014 at 06:18:15PM +0200, Stephen Warren wrote: On 08/15/2014 03:47 AM, Mikko Perttunen wrote: Currently the i2c-tegra bus driver prepares, enables and set_rates its clocks separately for each transfer. This causes locking proble

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Peter De Schrijver
On Fri, Aug 15, 2014 at 06:18:15PM +0200, Stephen Warren wrote: > On 08/15/2014 03:47 AM, Mikko Perttunen wrote: > > Currently the i2c-tegra bus driver prepares, enables > > and set_rates its clocks separately for each transfer. > > This causes locking problems when doing I2C transfers > > from clo

Re: [PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Stephen Warren
On 08/15/2014 03:47 AM, Mikko Perttunen wrote: Currently the i2c-tegra bus driver prepares, enables and set_rates its clocks separately for each transfer. This causes locking problems when doing I2C transfers from clock notifiers; see http://lists.infradead.org/pipermail/linux-arm-kernel/2014-Jul

[PATCH] i2c: i2c-tegra: Move clk_prepare/clk_set_rate to probe

2014-08-15 Thread Mikko Perttunen
Currently the i2c-tegra bus driver prepares, enables and set_rates its clocks separately for each transfer. This causes locking problems when doing I2C transfers from clock notifiers; see http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/268653.html This patch moves clk_prepare/unpre