Tony, Thanks for the inputs and suggestions for handling i2c-omap errata's in generic way. > -----Original Message----- > From: Tony Lindgren [mailto:tony@xxxxxxxxxxx] > Sent: Tuesday, April 27, 2010 8:31 PM > To: G, Manjunath Kondaiah > Cc: linux-omap@xxxxxxxxxxxxxxx; linux-i2c@xxxxxxxxxxxxxxx; > ben-linux@xxxxxxxxx; Kalliguddi, Hema; Menon, Nishanth; Aaro Koskinen > Subject: Re: [PATCH v5] OMAP2/3: I2C: Errata ID i207: Clear > wrong RDR interrupt > > * Manjunatha GK <manjugk@xxxxxx> [100427 07:21]: > > --- a/drivers/i2c/busses/i2c-omap.c > > +++ b/drivers/i2c/busses/i2c-omap.c > > @@ -199,6 +199,7 @@ struct omap_i2c_dev { > > u16 bufstate; > > u16 syscstate; > > u16 westate; > > + bool errata_i207; > > }; > > Thanks for updating this. > > One more comment though to make this more generic for handling > the other errata for i2c-omap. > > Can you please make errata_i207 to be just: > > u16 errata; > > And then we can use it for handing all the i2c-omap errata. > > You also need something like > > #define I2C_OMAP_ERRATA_I207 (1 << 0) Agreed. > > > const static u8 reg_map[] = { > > @@ -498,6 +499,12 @@ static int omap_i2c_init(struct > omap_i2c_dev *dev) > > /* Take the I2C module out of reset: */ > > omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); > > > > + dev->errata_i207 = false; > > + > > + if (cpu_is_omap2430() || cpu_is_omap34xx()) { > > + dev->errata_i207 = true; > > + } > > + > > /* Enable interrupts */ > > dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | > > OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK | > > Then update this for for the bitmask too > > dev->errata = 0; > > if (cpu_is_omap2430() || cpu_is_omap34xx()) > dev->errata |= I2C_OMAP_ERRATA_I207; > Ok. I will incorporate these changes in next version. -Manjunath -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html