]> git.hungrycats.org Git - linux/commit
i2c: imx: Add timer for handling the stop condition
authorCorey Minyard <minyard@acm.org>
Fri, 12 Nov 2021 13:39:55 +0000 (07:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:22:00 +0000 (13:22 +0100)
commitcb21407f0b3983986f57cdf5087df7f498040ba6
treeb1cb921ded399e41a3d97045ccc8438ec1c9b32d
parent33f649f1b1cea39ed360e6c12bba4fac83118e6e
i2c: imx: Add timer for handling the stop condition

[ Upstream commit f89bf95632b41695402996d96476c44c641d23d7 ]

Most IMX I2C interfaces don't generate an interrupt on a stop condition,
so it won't generate a timely stop event on a slave mode transfer.
Some users, like IPMB, need a timely stop event to work properly.

So, add a timer and add the proper handling to generate a stop event in
slave mode if the interface goes idle.

Signed-off-by: Corey Minyard <minyard@acm.org>
Tested-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Andrew Manley <andrew.manley@sealingtech.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: 87aec499368d ("i2c: imx: when being a target, mark the last read as processed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-imx.c