On Tue, Apr 9, 2013 at 7:53 PM, Antti Palosaari <crope@xxxxxx> wrote: > Chip uses WRITE + STOP + READ + STOP sequence for I2C register read. > Driver was using REPEATED START condition which makes it failing if > I2C adapter was implemented correctly. > > Add use_broken_read_reg_intentionally option to keep old buggy > implantation as there is buggy I2C adapter implementation relying > that bug... > > Signed-off-by: Antti Palosaari <crope@xxxxxx> Hi Antti, The existing code actually looks fine. This is actually how most devices do register reads. Further, it *should* be done in a single call to i2c_transfer() or else you won't hold the lock and you will create a race condition. This sounds more like it's a bug in the i2c master rather than the 5007 driver. Do you have i2c bus traces that clearly show that this was the cause of the issue? If we need to define something as "broken" behavior, at first glance it looks like the way *you're* proposing is the broken behavior - presumably to work around a bug in the i2c master not properly supporting repeated start. Also, any reason you didn't put Mike into the cc: for this (since he owns the driver)? Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html