[PATCHv7 2/3] OMAP: I2C: Remove the reset in the init path

Jon Hunter jon-hunter at ti.com
Fri Dec 2 16:48:04 EST 2011


Hi Shubhrajyoti,

On 12/2/2011 15:37, Jon Hunter wrote:

[snip]
>> @@ -594,6 +545,11 @@ static int omap_i2c_xfer_msg(struct i2c_adapter
>> *adap,
>> return r;
>> if (r == 0) {
>> dev_err(dev->dev, "controller timed out\n");
>> + if (dev->device_reset) {
>> + r = dev->device_reset(dev->dev);
>> + if (r< 0)
>> + dev_err(dev->dev, "reset failed\n");
>> + }
>> omap_i2c_init(dev);
>
> Why put the reset here? The function omap_i2c_init is going to perform a
> soft reset. So why not replace the reset in that function?
>
> Furthermore does this work for omap1 devices? I think that you would
> need to remove the existing soft-reset from omap_i2c_init() into an omap1.

Sorry, I see you did remove the soft-reset in the omap_i2c_init(). 
However, why not just replace the reset in the omap_i2c_init() instead 
of moving it?

As for omap1, I see we don't perform a soft-reset so that is a don't care.

Cheers
Jon




More information about the linux-arm-kernel mailing list