On Wed, Jul 01, 2015 at 10:34:09AM -0700, Yang Fang wrote:
On Wed, Jul 01, 2015 at 10:12:37AM -0700, Dylan Reid wrote:
Thanks, I think the error checking is good to have anyway, but should the interrupt also be disabled across suspend/resume? I'd hope this device's resume callback wouldn't happen until after the parent i2c bus is ready.
I am looping Mika. I was expecting that interrupt would come after i2c bus is ready. but with current pinctrl-cherryview driver the interrupt comes in random order after resume.
I wouldn't rely on this, it's not going to be true in general - the interrupt could flag at any time after the interrupt controller is resumed so unless the I2C controller takes steps to ensure it is resumed before interrupts (which has its own complications) you could get an interrupt delivered prior to the I2C controller being ready. Look at how arizona handles this for one example of dealing with this problem, though it's not ideal.