Javier Martinez Canillas
9ad2247442
i2c: exynos5: Avoid transaction timeouts due TRANSFER_DONE_AUTO not set
...
After commit 7999eecb7e
("i2c: exynos5: fix arbitration lost handling"),
some I2C transactions are failing because the TRANSFER_DONE_AUTO field is
not set in the I2C_TRANS_STATUS register so the i2c->status value is left
to -EINVAL causing the i2c->msg_complete completion to never be signaled.
For example, when reading the time of an I2C rtc on an Exynos5800 machine:
$ cat /sys/class/rtc/rtc0/time
[ 25.924594] exynos5-hsi2c 12e10000.i2c: rx timeout
[ 65.028365] max77686-rtc max77802-rtc: Fail to read time reg(-22)
cat: /sys/class/rtc/rtc0/time: Invalid argument
The Exynos5422 manual states clearly that most I2C_TRANS_STATUS reg bits
(including TRANSFER_DONE_AUTO) are cleared after the register is read. So
reading has side effects and should only be done if HSI2C_INT_I2C was set.
Fixes: 7999eecb7e
("i2c: exynos5: fix arbitration lost handling")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Wolfram Sang <wsa@the-dreams.de >
2017-03-09 15:50:16 +01:00
..
2014-01-24 18:21:11 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-05-22 10:09:21 +02:00
2014-11-07 18:35:33 +01:00
2016-08-22 08:19:55 +02:00
2014-03-13 09:44:59 +01:00
2017-02-20 19:23:52 +01:00
2015-10-23 23:31:11 +02:00
2016-11-18 02:05:03 +01:00
2017-02-20 19:19:54 +01:00
2016-11-18 02:05:03 +01:00
2016-10-07 14:12:21 -07:00
2017-02-09 17:06:52 +01:00
2017-03-08 18:00:49 +01:00
2017-01-25 22:07:40 +01:00
2014-10-20 16:20:37 +02:00
2016-08-22 08:19:55 +02:00
2017-01-28 22:16:38 +01:00
2016-08-22 08:19:55 +02:00
2016-02-12 20:40:13 +01:00
2017-02-25 14:21:18 -08:00
2017-03-08 18:15:18 +01:00
2016-12-01 23:38:43 +01:00
2017-03-08 18:15:18 +01:00
2016-11-18 01:48:01 +01:00
2016-08-22 08:19:55 +02:00
2016-11-18 02:05:03 +01:00
2016-08-22 08:19:55 +02:00
2017-02-09 17:06:52 +01:00
2016-06-19 19:45:43 +02:00
2017-02-09 17:06:52 +01:00
2017-03-09 15:50:16 +01:00
2014-10-20 16:20:37 +02:00
2014-10-20 16:20:37 +02:00
2016-08-22 08:19:55 +02:00
2014-11-07 18:35:33 +01:00
2017-02-09 17:39:16 +01:00
2017-03-02 08:42:32 +01:00
2008-01-27 18:14:45 +01:00
2016-08-22 08:19:55 +02:00
2017-02-25 14:21:18 -08:00
2017-02-09 17:06:52 +01:00
2016-04-11 18:54:59 +02:00
2014-11-07 18:35:33 +01:00
2016-08-22 08:19:55 +02:00
2016-08-22 08:19:55 +02:00
2016-10-25 11:48:58 +02:00
2014-10-20 16:20:37 +02:00
2016-08-22 08:19:55 +02:00
2017-03-08 18:06:47 +01:00
2016-11-24 16:21:42 +01:00
2017-03-02 08:42:32 +01:00
2017-03-08 18:03:41 +01:00
2017-01-25 22:17:23 +01:00
2016-08-22 08:19:55 +02:00
2014-11-07 18:35:33 +01:00
2017-02-09 17:06:52 +01:00
2016-08-22 08:19:55 +02:00
2016-08-22 08:19:55 +02:00
2016-12-17 19:27:44 +01:00
2017-02-23 13:03:56 +01:00
2016-08-26 00:41:58 +02:00
2017-01-25 22:17:24 +01:00
2016-06-29 17:33:18 +10:00
2014-12-14 16:10:09 -08:00
2015-08-10 08:37:28 +02:00
2015-08-10 08:37:34 +02:00
2014-11-07 18:35:33 +01:00
2016-06-19 19:49:29 +02:00
2015-04-23 19:35:30 +02:00
2017-02-09 17:13:01 +01:00
2016-08-22 08:19:55 +02:00
2016-08-22 08:19:55 +02:00
2016-04-11 18:54:59 +02:00
2016-08-22 08:19:55 +02:00
2016-11-18 01:44:38 +01:00
2016-12-01 23:34:33 +01:00
2016-11-29 22:43:38 +01:00
2016-12-11 22:48:53 +01:00
2017-03-08 17:54:59 +01:00
2016-10-25 11:11:46 +02:00
2017-02-09 17:06:52 +01:00
2016-08-22 08:19:55 +02:00
2014-01-24 18:24:31 +01:00
2016-08-22 08:19:55 +02:00
2017-02-09 17:06:52 +01:00
2014-11-07 18:35:33 +01:00
2014-12-14 16:10:09 -08:00
2016-08-22 08:19:55 +02:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2017-02-09 17:06:52 +01:00
2017-01-25 22:16:59 +01:00
2016-08-22 08:19:55 +02:00
2014-10-20 16:20:37 +02:00
2015-11-30 18:37:22 +01:00
2017-02-20 19:12:38 +01:00
2016-09-08 22:36:18 +02:00
2017-02-23 13:03:56 +01:00
2014-01-13 13:56:52 +01:00
2016-11-18 02:16:08 +01:00
2016-11-18 02:13:11 +01:00
2016-07-14 21:21:56 +09:00
2014-11-07 18:35:33 +01:00
2014-11-07 18:35:33 +01:00
2016-11-18 02:05:03 +01:00
2016-08-22 08:19:55 +02:00
2017-02-09 17:06:52 +01:00
2016-08-22 08:19:55 +02:00
2017-02-09 17:06:52 +01:00
2017-02-09 17:06:52 +01:00
2017-02-20 19:12:38 +01:00
2017-02-20 19:12:38 +01:00
2014-12-14 16:10:09 -08:00