summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>2020-03-22 19:20:19 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-04-28 13:31:09 +0200
commit068143a8195fb0fdeea1f3ca430b3db0f6d04a53 (patch)
tree354617a6f72aaffa1de1df08cd61297f32f4aa52
parentLinux 5.7-rc3 (diff)
downloadlinux-068143a8195fb0fdeea1f3ca430b3db0f6d04a53.tar.xz
linux-068143a8195fb0fdeea1f3ca430b3db0f6d04a53.zip
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: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode") Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/busses/i2c-bcm-iproc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index 44be0926b566..d091a12596ad 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -360,6 +360,9 @@ static bool bcm_iproc_i2c_slave_isr(struct bcm_iproc_i2c_dev *iproc_i2c,
value = (u8)((val >> S_RX_DATA_SHIFT) & S_RX_DATA_MASK);
i2c_slave_event(iproc_i2c->slave,
I2C_SLAVE_WRITE_RECEIVED, &value);
+ if (rx_status == I2C_SLAVE_RX_END)
+ i2c_slave_event(iproc_i2c->slave,
+ I2C_SLAVE_STOP, &value);
}
} else if (status & BIT(IS_S_TX_UNDERRUN_SHIFT)) {
/* Master read other than start */