summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-eg20t.c
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>2011-10-12 06:13:04 +0200
committerBen Dooks <ben-linux@fluff.org>2011-10-29 12:09:33 +0200
commit3cf21a7c48389c167065bffd61db39a9bd201f07 (patch)
tree07f37090b058e7aa8fb04676d4a560d2e37a381c /drivers/i2c/busses/i2c-eg20t.c
parenti2c-eg20t: Separate error processing (diff)
downloadlinux-3cf21a7c48389c167065bffd61db39a9bd201f07.tar.xz
linux-3cf21a7c48389c167065bffd61db39a9bd201f07.zip
i2c-eg20t: add stop sequence in case wait-event timeout occurs
add stop sequence in case wait-event timeout in write processing. (read processing already had it) Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-eg20t.c')
-rw-r--r--drivers/i2c/busses/i2c-eg20t.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index cb296862ae0a..318e6a5a710f 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -456,6 +456,7 @@ static s32 pch_i2c_writebytes(struct i2c_adapter *i2c_adap,
pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMIF_BIT);
return -EAGAIN;
} else { /* wait-event timeout */
+ pch_i2c_stop(adap);
return -ETIME;
}
@@ -476,6 +477,7 @@ static s32 pch_i2c_writebytes(struct i2c_adapter *i2c_adap,
pch_clrbit(adap->pch_base_address, PCH_I2CSR,
I2CMIF_BIT);
} else { /* wait-event timeout */
+ pch_i2c_stop(adap);
return -ETIME;
}
}
@@ -632,6 +634,7 @@ static s32 pch_i2c_readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs,
pch_clrbit(adap->pch_base_address, PCH_I2CSR, I2CMIF_BIT);
return -EAGAIN;
} else { /* wait-event timeout */
+ pch_i2c_stop(adap);
return -ETIME;
}