summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFugang Duan <B38611@freescale.com>2012-09-10 13:05:26 +0800
committerJason Liu <r64343@freescale.com>2012-09-12 19:53:05 +0800
commit7f2179458a087d5cf6ccc04f48c39a859307d3fc (patch)
tree1f64c999e6c749b46774f470ab8261f6f7913044
parent9554b123da06a283e9736ab3c939c372ed07f6aa (diff)
ENGR00221671 - i2c :imx : fix some i2c devices can not suspend
i2c device (isl29023) can not suspend once during hdmi audio suspend/resume test, and print log: pm_op(): i2c_device_pm_suspend+0x0/0x38 returns -4 PM: Device 2-0044 failed to suspend: error -4 PM: Some devices failed to suspend PM: resume of devices complete after 40.936 msecs Restarting tasks ... done. Because suspend function in isl29023 driver requires i2c bus to write isl29023 device. I2C apdater driver process any signal as exception during waiting the bus idle, so once user space sent out signal during suspend, I2C device cannot request bus. Using "fatal_signal_pending()" instead of "signal_pending()" to avoid the waiting of bus idle to be terminated by general signals except SIGKILL. After the change, i2c adapter can be terminated by kill signal from user space with "CTRL+C" or kill command operation. Signed-off-by: Fugang Duan <B38611@freescale.com>
-rw-r--r--drivers/i2c/busses/i2c-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 4c2a62b75b5c..df9fca34915d 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -141,7 +141,7 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
break;
if (!for_busy && !(temp & I2SR_IBB))
break;
- if (signal_pending(current)) {
+ if (fatal_signal_pending(current)) {
dev_dbg(&i2c_imx->adapter.dev,
"<%s> I2C Interrupted\n", __func__);
return -EINTR;