Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Felipe Balbi
Hi, On Thu, Oct 25, 2012 at 03:04:29PM +0530, Shubhrajyoti Datta wrote: > On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi wrote: > > [...] > >> + * Don't write to this register if the IE state is 0 as it can > >> + * cause deadlock. > >> + */ > >> + if (dev->iestate) > >> +

Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Shubhrajyoti Datta
On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi wrote: [...] >> + * Don't write to this register if the IE state is 0 as it can >> + * cause deadlock. >> + */ >> + if (dev->iestate) >> + omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate); >> +} >> + >> static in

Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-25 Thread Felipe Balbi
Hi, On Thu, Oct 25, 2012 at 12:23:56PM +0530, Shubhrajyoti Datta wrote: > >> @@ -1268,23 +1276,8 @@ static int omap_i2c_runtime_resume(struct device > >> *dev) > >> { > >> struct omap_i2c_dev *_dev = dev_get_drvdata(dev); > >> > >> - if (_dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE)

Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti Datta
On Thu, Oct 25, 2012 at 12:06 PM, Felipe Balbi wrote: > Hi, > > On Thu, Oct 25, 2012 at 12:06:51PM +0530, Shubhrajyoti D wrote: >> re-factor omap_i2c_init() so that we can re-use it for resume. >> While at it also remove the bufstate variable as we write it >> in omap_i2c_resize_fifo for every tra

Re: [PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Felipe Balbi
Hi, On Thu, Oct 25, 2012 at 12:06:51PM +0530, Shubhrajyoti D wrote: > re-factor omap_i2c_init() so that we can re-use it for resume. > While at it also remove the bufstate variable as we write it > in omap_i2c_resize_fifo for every transfer. > > Signed-off-by: Shubhrajyoti D > --- > v2 - add the

[PATCH v2] i2c: omap: re-factor omap_i2c_init function

2012-10-24 Thread Shubhrajyoti D
re-factor omap_i2c_init() so that we can re-use it for resume. While at it also remove the bufstate variable as we write it in omap_i2c_resize_fifo for every transfer. Signed-off-by: Shubhrajyoti D --- v2 - add the iestate 0 check back. - Remove a stray change. - Applies on top of Felipe's pat