i2c: mv64xxx: Add atomic_xfer method to driver
authorChris Morgan <macromorgan@hotmail.com>
Wed, 30 Mar 2022 17:16:57 +0000 (12:16 -0500)
committerWolfram Sang <wsa@kernel.org>
Tue, 14 Jun 2022 20:10:10 +0000 (22:10 +0200)
commit544a8d75f3d6e60e160cd92dc56321484598a993
treeedbdba1ae8a25d2d7bb311272ee5293ab4a55c68
parent09b343038e3470e4d0da45f0ee09fb42107e5314
i2c: mv64xxx: Add atomic_xfer method to driver

Add an atomic_xfer method to the driver so that it behaves correctly
when controlling a PMIC that is responsible for device shutdown.

The atomic_xfer method added is similar to the one from the i2c-rk3x
driver. When running an atomic_xfer a bool flag in the driver data is
set, the interrupt is not unmasked on transfer start, and the IRQ
handler is manually invoked while waiting for pending transfers to
complete.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mv64xxx.c