i2c: owl: Add support for atomic transfers
authorCristian Ciocaltea <cristian.ciocaltea@gmail.com>
Thu, 8 Oct 2020 21:44:40 +0000 (00:44 +0300)
committerWolfram Sang <wsa@kernel.org>
Tue, 3 Nov 2020 20:56:49 +0000 (21:56 +0100)
commitb8be24ec67b6374efded49b35a10b84a1b255b30
treecc610956c7655a5bd7a18bb1c46e6e4be5397f27
parent46d43ee48d4fed3f8a5c93295f5a414c71a30fd4
i2c: owl: Add support for atomic transfers

Atomic transfers are required to properly power off a machine through
an I2C controlled PMIC, such as the Actions Semi ATC260x series.

System shutdown may happen with interrupts being disabled and, as a
consequence, the kernel may hang if the driver does not support atomic
transfers.

This functionality is essentially implemented by polling the FIFO
Status register until either Command Execute Completed or NACK Error
bits are set.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[wsa: rebased to current tree]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-owl.c