]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: xiic: Make the start and the byte count write atomic
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Mon, 3 Sep 2018 09:41:11 +0000 (15:11 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 6 Sep 2018 18:49:09 +0000 (20:49 +0200)
commit335e4786dc2cf001b599d3d318cca5d13eb0163c
tree4c61d7881ff1dc2a59c66ddc63b89887a165e5f0
parent0e1374da449c905d0ef680d0b32dffcb3b4cc974
i2c: xiic: Make the start and the byte count write atomic

Disable interrupts while configuring the transfer and enable them back.

We have below as the programming sequence
1. start and slave address
2. byte count and stop

In some customer platform there was a lot of interrupts between 1 and 2
and after slave address (around 7 clock cyles) if 2 is not executed
then the transaction is nacked.

To fix this case make the 2 writes atomic.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[wsa: added a newline for better readability]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-xiic.c