]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: at91: fix support of the "alternative command" feature
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Wed, 3 Aug 2016 14:58:26 +0000 (16:58 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 14 Aug 2016 22:55:30 +0000 (00:55 +0200)
commit7034e18370e7f01a9aeec4fa02e2d47e0e6365a1
treebf7cda9088b48db8bcd78a67d36ac12002cb23b9
parent6e418cb8b9eac1de9e687df634a2220941d31fd9
i2c: at91: fix support of the "alternative command" feature

The "alternative command" feature was introduced with sama5d2 SoCs.

Its purpose is to let the hardware i2c controller automatically send the
STOP condition on the i2c bus at the end of a data transfer.
Without this feature, the i2c driver has to write the 'STOP' bit into the
Control Register so the hardware i2c controller is triggered to send the
STOP condition on the bus.

Using the "alternative command" feature requires to set the transfer data
length into the 8bit DATAL field of the Alternative Command Register.
Hence only data transfers up to 255 bytes can take advantage of the
"alternative command" feature. For greater data transfer sizes, the driver
should use the previous implementation, when the "alternative command"
support was not implemented yet.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-at91.c