Thread (1 message) 1 message, 1 author, 2011-03-28

Re: [PATCH] i2c: busses: i2c-tegra: Using suspend_noirq()/resume_noirq() for suspend/resume

From: Colin Cross <hidden>
Date: 2011-03-28 06:34:07

Possibly related (same subject, not in this thread)

On Sun, Mar 27, 2011 at 11:22 PM,  [off-list ref] wrote:
From: Wei Ni <redacted>

When use rtc-tps6586x wakealarm to suspend/resume,
it will show a lot error messages:
"tps6586x 4-0034: failed to read interrupt status
tps6586x 4-0034: failed reading from 0xb5"
After resume, the system will call tps6586x_irq() because of the alarm
interrupt. This irq handle will read tps6586x interrupt status (0xb5), but at
that time the i2c driver didn't resume yet, the system didn't call the
tegra_i2c_resume(), so the reading will be failed.
I2C driver needs to be suspended late and resumed early than other drivers.
So, I2C driver uses the suspend_noirq/resume_noirq callbacks of struct dev_pm_ops
for early/late power management system.
This sounds like a bug in rtc-tps6586x.  I think you need to call
disable_irq in the rtc-tps6586x suspend function and an enable_irq in
the resume function, which will delay the delivery of the wake irq
until the rtc driver (and its parent, the i2c driver) has been
resumed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help