Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-08 Thread David.Wu
Hi Grygorii, Doug and Heiko, Thanks for your replies. I will do 2 steps: 1. Add "suspended" flag in suspend_noirq()/resume_noirq() callback to prevent new i2c started, and use i2c_lock_adapter() to wait for current i2c transfer finished. 2. IRQF_NO_SUSPEND added could make i2c work well duri

Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-07 Thread Grygorii Strashko
On 12/06/2016 09:37 PM, David.Wu wrote: > Hi Doug, > > 在 2016/12/7 0:31, Doug Anderson 写道: >> Hi, >> >> On Tue, Dec 6, 2016 at 12:12 AM, David.Wu >> wrote: >>> Hi Heiko, >>> >>> 在 2016/12/5 18:54, Heiko Stuebner 写道: Hi David, Am Montag, 5. Dezember 2016, 16:02:59 CET schrieb

Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-06 Thread David.Wu
Hi Doug, 在 2016/12/7 0:31, Doug Anderson 写道: Hi, On Tue, Dec 6, 2016 at 12:12 AM, David.Wu wrote: Hi Heiko, 在 2016/12/5 18:54, Heiko Stuebner 写道: Hi David, Am Montag, 5. Dezember 2016, 16:02:59 CET schrieb David Wu: During suspend there may still be some i2c access happening. And if we

Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-06 Thread Doug Anderson
Hi, On Tue, Dec 6, 2016 at 12:12 AM, David.Wu wrote: > Hi Heiko, > > 在 2016/12/5 18:54, Heiko Stuebner 写道: >> >> Hi David, >> >> Am Montag, 5. Dezember 2016, 16:02:59 CET schrieb David Wu: >>> >>> During suspend there may still be some i2c access happening. >>> And if we don't keep i2c irq ON, th

Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-06 Thread David.Wu
Hi Heiko, 在 2016/12/5 18:54, Heiko Stuebner 写道: Hi David, Am Montag, 5. Dezember 2016, 16:02:59 CET schrieb David Wu: During suspend there may still be some i2c access happening. And if we don't keep i2c irq ON, there may be i2c access timeout if i2c is in irq mode of operation. can you desc

Re: [PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-05 Thread Heiko Stuebner
Hi David, Am Montag, 5. Dezember 2016, 16:02:59 CET schrieb David Wu: > During suspend there may still be some i2c access happening. > And if we don't keep i2c irq ON, there may be i2c access timeout if > i2c is in irq mode of operation. can you describe the issue you're trying to fix a bit more

[PATCH] i2c: rk3x: keep i2c irq ON in suspend

2016-12-05 Thread David Wu
During suspend there may still be some i2c access happening. And if we don't keep i2c irq ON, there may be i2c access timeout if i2c is in irq mode of operation. Signed-off-by: David Wu --- drivers/i2c/busses/i2c-rk3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/