Skip to content
Snippets Groups Projects
Commit bb79a079 authored by Oskar Schirmer's avatar Oskar Schirmer Committed by Wolfram Sang
Browse files

i2c: imx: fix imx driver to work though signal is pending


Interrupt a test application for I2C based mc13xxx driven
touch panel, SIGINT, causes open event file descriptor to be
closed, which in turn causes I2C activity to mask PMIC local
interrupts. This eventually ends up in i2c_imx_bus_busy to
wait for some busy flag to toggle, but while waiting it would
find a signal pending and break. The final symptom is the
device is not closed down cleanly and thus not reopenable.

Do without check for pending signal.

Signed-off-by: default avatarOskar Schirmer <oskar@scara.com>
Acked-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
parent 10452280
No related branches found
No related tags found
No related merge requests found
...@@ -149,11 +149,6 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy) ...@@ -149,11 +149,6 @@ static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
break; break;
if (!for_busy && !(temp & I2SR_IBB)) if (!for_busy && !(temp & I2SR_IBB))
break; break;
if (signal_pending(current)) {
dev_dbg(&i2c_imx->adapter.dev,
"<%s> I2C Interrupted\n", __func__);
return -EINTR;
}
if (time_after(jiffies, orig_jiffies + msecs_to_jiffies(500))) { if (time_after(jiffies, orig_jiffies + msecs_to_jiffies(500))) {
dev_dbg(&i2c_imx->adapter.dev, dev_dbg(&i2c_imx->adapter.dev,
"<%s> I2C bus is busy\n", __func__); "<%s> I2C bus is busy\n", __func__);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment