Michael Wu
3b5f7f10ff
i2c: designware: slave should do WRITE_REQUESTED before WRITE_RECEIVED
...
Sometimes we would get the following flow when doing an i2cset:
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4
I2C_SLAVE_WRITE_RECEIVED
0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x714 : INTR_STAT=0x204
I2C_SLAVE_WRITE_REQUESTED
I2C_SLAVE_WRITE_RECEIVED
Documentation/i2c/slave-interface.rst says that I2C_SLAVE_WRITE_REQUESTED,
which is mandatory, should be sent while the data did not arrive yet. It
means in a write-request I2C_SLAVE_WRITE_REQUESTED should be reported
before any I2C_SLAVE_WRITE_RECEIVED.
By the way, I2C_SLAVE_STOP didn't be reported in the above case because
DW_IC_INTR_STAT was not 0x200.
dev->status can be used to record the current state, especially Designware
I2C controller has no interrupts to identify a write-request. This patch
makes not only I2C_SLAVE_WRITE_REQUESTED been reported first when
IC_INTR_RX_FULL is rising and dev->status isn't STATUS_WRITE_IN_PROGRESS
but also I2C_SLAVE_STOP been reported when a STOP condition is received.
Signed-off-by: Michael Wu <michael.wu@vatics.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2020-11-06 16:02:00 +01:00
..
2019-06-19 17:09:55 +02:00
2020-07-04 08:25:13 +02:00
2020-07-04 08:25:13 +02:00
2019-06-05 17:37:16 +02:00
2020-05-20 15:28:03 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2020-07-23 22:04:08 +02:00
2020-04-30 16:11:41 +02:00
2020-09-21 11:45:43 +02:00
2019-03-25 15:21:17 +01:00
2020-09-14 08:55:44 +02:00
2020-05-05 16:37:21 +02:00
2020-08-05 11:52:27 +02:00
2019-03-24 22:41:51 +01:00
2020-08-05 11:52:27 +02:00
2019-05-30 11:26:37 -07:00
2020-04-18 23:42:14 +02:00
2020-09-18 23:02:03 +02:00
2020-08-25 09:46:38 +02:00
2020-04-18 23:42:14 +02:00
2020-04-26 10:00:29 +02:00
2020-07-22 12:28:07 +02:00
2019-02-08 22:18:51 +01:00
2020-04-18 23:42:14 +02:00
2020-09-27 15:14:16 +02:00
2020-01-31 09:01:25 +01:00
2020-04-15 12:09:09 +02:00
2020-03-21 19:53:08 +01:00
2020-06-23 21:24:33 +02:00
2020-06-23 21:24:33 +02:00
2020-05-30 23:02:22 +02:00
2020-07-23 22:04:08 +02:00
2020-08-07 20:07:44 +02:00
2020-11-06 16:02:00 +01:00
2020-07-23 22:04:08 +02:00
2020-03-24 22:36:59 +01:00
2019-06-05 17:37:10 +02:00
2020-09-29 21:37:46 +02:00
2020-08-10 15:47:38 +02:00
2019-05-30 11:26:37 -07:00
2020-07-04 08:25:13 +02:00
2020-06-11 12:32:14 +02:00
2020-07-24 21:31:33 +02:00
2020-03-10 12:31:55 +01:00
2020-02-07 12:54:13 -08:00
2020-04-15 12:09:09 +02:00
2019-05-30 11:26:37 -07:00
2020-10-21 10:54:05 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-06-07 20:45:24 +02:00
2020-04-18 23:42:14 +02:00
2020-04-18 23:42:14 +02:00
2020-10-10 13:03:54 +02:00
2020-01-15 20:31:27 +01:00
2019-07-15 21:10:39 -07:00
2019-05-30 11:26:41 -07:00
2020-09-21 11:58:49 +02:00
2020-09-21 11:46:05 +02:00
2019-06-05 17:36:38 +02:00
2020-04-18 23:42:14 +02:00
2020-10-08 11:57:23 +02:00
2020-11-06 15:52:19 +01:00
2020-07-04 08:20:38 +02:00
2018-01-15 19:19:55 +01:00
2020-11-03 22:13:10 +01:00
2020-03-24 22:36:59 +01:00
2020-09-29 21:40:03 +02:00
2020-09-18 23:11:44 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2020-07-04 08:25:13 +02:00
2020-09-27 20:05:27 +02:00
2020-09-21 12:05:40 +02:00
2020-01-15 20:39:26 +01:00
2018-03-02 11:11:15 +01:00
2018-03-02 11:11:15 +01:00
2020-04-15 12:09:09 +02:00
2020-08-23 17:36:59 -05:00
2020-08-23 17:36:59 -05:00
2020-10-21 10:54:05 -07:00
2020-03-10 12:19:52 +01:00
2019-05-30 11:26:41 -07:00
2019-05-30 11:26:37 -07:00
2020-04-15 12:12:52 +02:00
2020-07-04 08:25:13 +02:00
2020-02-07 12:54:13 -08:00
2020-07-04 08:25:13 +02:00
2020-04-30 16:18:30 +02:00
2019-06-19 17:09:10 +02:00
2020-06-03 22:37:37 +02:00
2020-04-18 23:38:20 +02:00
2020-09-29 21:40:03 +02:00
2020-04-26 10:15:37 +02:00
2020-10-21 10:54:05 -07:00
2020-03-24 22:36:59 +01:00
2020-09-27 19:58:56 +02:00
2019-06-05 17:37:10 +02:00
2020-06-13 13:12:38 -07:00
2019-06-05 17:37:10 +02:00
2016-08-22 08:19:55 +02:00
2020-11-06 15:25:31 +01:00
2020-07-04 08:25:13 +02:00
2019-06-19 17:09:07 +02:00
2020-07-04 08:25:13 +02:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2020-04-18 23:42:14 +02:00
2020-04-02 15:54:13 -07:00
2020-09-21 11:45:43 +02:00
2019-08-14 14:56:54 +02:00
2020-09-21 11:45:43 +02:00
2020-09-21 11:45:43 +02:00
2020-04-15 12:09:09 +02:00
2020-04-18 23:42:14 +02:00
2020-07-23 22:04:08 +02:00
2020-01-15 20:39:41 +01:00
2019-05-30 11:29:52 -07:00
2020-10-05 22:57:45 +02:00
2020-03-24 22:36:59 +01:00
2020-01-06 15:40:43 +01:00
2020-04-18 23:42:14 +02:00
2020-04-18 23:42:14 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:37 -07:00
2020-07-23 22:04:08 +02:00
2019-05-30 11:26:32 -07:00
2020-03-24 22:36:59 +01:00
2019-05-21 11:28:45 +02:00
2020-08-28 09:00:00 +02:00
2020-04-18 23:42:14 +02:00
2020-04-15 12:09:09 +02:00
2020-04-15 12:09:09 +02:00
2020-11-06 15:55:57 +01:00
2020-09-27 19:58:38 +02:00
2020-07-23 22:04:08 +02:00