i2c: stm32f7: Add atomic_xfer method to driver
authorSean Nyekjaer <sean@geanix.com>
Wed, 16 Aug 2023 08:05:52 +0000 (10:05 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 27 Sep 2023 19:27:24 +0000 (21:27 +0200)
commit470a662688563d8f5e0fb164930d6f5507a883e4
tree39a18bd2a3ca091fddc62153baf0751871925f94
parent3a133a4e44554bb7af114f231db2f30f447417cc
i2c: stm32f7: 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-mv64xxx
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: Sean Nyekjaer <sean@geanix.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-stm32f7.c