i2c: imx: Synthesize end of transaction events without idle interrupts
authorKevin Paul Herbert <kph@platinasystems.com>
Tue, 22 Dec 2020 19:48:50 +0000 (11:48 -0800)
committerWolfram Sang <wsa@kernel.org>
Mon, 1 Feb 2021 22:12:01 +0000 (23:12 +0100)
commit05ae60bc24f765d0db6b7c6e5acabf22718b823d
tree8972cf5748362c6568ad8b09bf97e66aa573beb5
parente0371298ddc51761be257698554ea507ac8bf831
i2c: imx: Synthesize end of transaction events without idle interrupts

Only the Layerscape SoCs have interrupts on bus idle, which facilitate
sending events which complete slave bus transactions.

Add support for synthesizing missing events. If we see a master request,
or a newly addressed slave request, if the last event sent to the backend
was I2C_SLAVE_READ_REQUESTED, send the backend a I2C_SLAVE_READ_PROCESSED
followed by I2C_SLAVE_STOP. For all other events, send an I2C_SLAVE_STOP.

Signed-off-by: Kevin Paul Herbert <kph@platinasystems.com>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-imx.c