mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
i2c: iproc: generate stop event for slave writes
commit 068143a8195fb0fdeea1f3ca430b3db0f6d04a53 upstream.
When slave status is I2C_SLAVE_RX_END, generate I2C_SLAVE_STOP
event to i2c_client.
Fixes: c245d94ed1 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
92c9919781
commit
44e2a98e2b
1 changed files with 3 additions and 0 deletions
|
|
@ -359,6 +359,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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue