Skip to content

Commit 068143a

Browse files
rayagondaWolfram Sang
authored andcommitted
i2c: iproc: generate stop event for slave writes
When slave status is I2C_SLAVE_RX_END, generate I2C_SLAVE_STOP event to i2c_client. Fixes: c245d94 ("i2c: iproc: Add multi byte read-write support for slave mode") Signed-off-by: Rayagonda Kokatanur <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 6a8b55e commit 068143a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/i2c/busses/i2c-bcm-iproc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ static bool bcm_iproc_i2c_slave_isr(struct bcm_iproc_i2c_dev *iproc_i2c,
360360
value = (u8)((val >> S_RX_DATA_SHIFT) & S_RX_DATA_MASK);
361361
i2c_slave_event(iproc_i2c->slave,
362362
I2C_SLAVE_WRITE_RECEIVED, &value);
363+
if (rx_status == I2C_SLAVE_RX_END)
364+
i2c_slave_event(iproc_i2c->slave,
365+
I2C_SLAVE_STOP, &value);
363366
}
364367
} else if (status & BIT(IS_S_TX_UNDERRUN_SHIFT)) {
365368
/* Master read other than start */

0 commit comments

Comments
 (0)