On 11/4/20 12:17 PM, michael...@vatics.com wrote:
Hi Wolfram,
dev->status can be used to record the current state, especially Designware
I2C controller has no interrupts to identify a write-request. This patch
Just double-checking: the designware HW does not raise an interrupt when
its own
Hi Wolfram,
> Thanks for the detailed explanation! Okay, then what you do looks
> correct to me (from a high level perspective without really knowing the
> HW): when RX is full, you first send the state WRITE_REQUESTED when
> there is no other transfer on-going. Then you send WRITE_RECEIVED
>
Michael.Wu(吳忠益) would like to recall the message, "[PATCH 2/2] i2c: designware:
slave should do WRITE_REQUESTED before WRITE_RECEIVED".
> Not exactly. There're an interrupt state name "RD_REQ" but no one named
> like "WR_REQ".
>
> For read-request, the slave will get a RD_REQ interrupt.
> For write-request, the slave won't be interrupted until data arrived to
> trigger interrupt "RX_FULL".
>
> I tried to use GPIO to simulate
Hi Wolfram,
> > dev->status can be used to record the current state, especially Designware
> > I2C controller has no interrupts to identify a write-request. This patch
>
> Just double-checking: the designware HW does not raise an interrupt when
> its own address + RW bit has been received?
Not
Hi Michael,
> 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.
Correct.
>
On 10/30/20 10:04 AM, Michael Wu wrote:
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
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
Michael.Wu(吳忠益) would like to recall the message, "[PATCH 2/2] i2c: designware:
slave should do WRITE_REQUESTED before WRITE_RECEIVED".
Sometime we would get the following flows when doing an i2cset:
1. No any WRITE_REQUESTED
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4
WRITE_RECEIVED
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x514 : INTR_STAT=0x4
WRITE_RECEIVED
0x1 STATUS SLAVE_ACTIVITY=0x0 :
10 matches
Mail list logo