linux/drivers/i2c
Neil Brown b4fde5e7ed I2C: OMAP: Fix timeout problem during suspend.
On a board with OMAP3 processor and TWL4030 Power management,
we need to talk to the TWL4030 during late suspend but cannot
because the I2C interrupt is disabled (as late suspend disables
interrupt).

e.g. I get messages like:

[   62.161102] musb-omap2430 musb-omap2430: LATE power domain suspend
[   63.167205] omap_i2c omap_i2c.1: controller timed out
[   63.183044] twl: i2c_read failed to transfer all messages
[   64.182861] omap_i2c omap_i2c.1: controller timed out
[   64.198455] twl: i2c_write failed to transfer all messages
[   65.198455] omap_i2c omap_i2c.1: controller timed out
[   65.203765] twl: i2c_write failed to transfer all messages

The stack shows omap2430_runtime_suspend calling twl4030_set_suspend
which tries to power-down the USB PHY (twl4030_phy_suspend ->
twl4030_phy_power -> __twl4030_phy_power which as a nice WARN_ON
that helps).

Then we get the same in resume:

[   69.603912] musb-omap2430 musb-omap2430: EARLY power domain resume
[   70.610473] omap_i2c omap_i2c.1: controller timed out
[   70.626129] twl: i2c_write failed to transfer all messages
etc.

So don't disable interrupts for I2C.

Acked-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-07-08 12:49:15 +02:00
..
algos i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
busses I2C: OMAP: Fix timeout problem during suspend. 2012-07-08 12:49:15 +02:00
muxes i2c: Add generic I2C multiplexer using pinctrl API 2012-06-04 16:49:43 +02:00
Kconfig i2c: muxes are not EXPERIMENTAL anymore 2012-05-12 14:28:16 +02:00
Makefile i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter 2011-03-20 14:50:53 +01:00
i2c-boardinfo.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-core.c i2c: implement i2c_verify_adapter 2012-05-12 14:28:16 +02:00
i2c-core.h i2c: Update the FSF address 2012-03-26 21:47:19 +02:00
i2c-dev.c i2c-dev: Add support for I2C_M_RECV_LEN 2012-05-30 10:55:34 +02:00
i2c-mux.c i2c/of: Automatically populate i2c mux busses from device tree data. 2012-05-12 14:28:16 +02:00
i2c-smbus.c i2c: Update the FSF address 2012-03-26 21:47:19 +02:00