]> 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)
commit940df7d617c542c46bb4751b279ead9b96e03862
treecc610956c7655a5bd7a18bb1c46e6e4be5397f27
parentddc9bceeeef3520e56ab0b0b14ba4017c8befb64
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