]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3fce05e5f054713544c1bdb89e571d2b19f301e7
treeedbdba1ae8a25d2d7bb311272ee5293ab4a55c68
parentda12879bcf7f67778999417955f364ed2df60bf0
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