]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit0a2d881b456a4736a59fff6fd3760e457d3d3134
treecc610956c7655a5bd7a18bb1c46e6e4be5397f27
parente2ee12bc8a1cdafbae840eb43ec82c9127eae678
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