]> asedeno.scripts.mit.edu Git - linux.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)
commit434f14e745442a4230a40cf47f84deac1028f64f
treebf7cda9088b48db8bcd78a67d36ac12002cb23b9
parent97ccd4af120c6ee183f424f17672870809bd6efd
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