Re: [PATCH] i2c: at91: fix write transfers by clearing pending interrupt first

2015-10-13 Thread Cyrille Pitchen
Le 13/10/2015 17:19, Peter Rosin a écrit : > On 2015-10-13 16:21, Ludovic Desroches wrote: >> From: Cyrille Pitchen <cyrille.pitc...@atmel.com> >> >> In some cases a NACK interrupt may be pending in the Status Register (SR) >> as a result of a previous transfer. H

Re: [PATCH 1/2] i2c: at91: add DT property for the HOLD field of TWIHS_CWGR

2015-09-30 Thread Cyrille Pitchen
ave devices connected to the bus, add a DT > property "atmel,twd-hold-cycles" to specify this HOLD field. > > Signed-off-by: Wenyou Yang <wenyou.y...@atmel.com> > Signed-off-by: Ludovic Desroches <ludovic.desroc...@atmel.com> Acked-by: Cyrille Pitchen <cyrille.pitc.

[PATCH 0/1] i2c: at91: fix code checker warnings

2015-06-11 Thread Cyrille Pitchen
/i2c/busses/i2c-at91.c:293: style: Checking if unsigned variable 'buf_len' is less than zero. Thanks for reporting! Cyrille Pitchen (1): i2c: at91: fix code checker warnings drivers/i2c/busses/i2c-at91.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.8.2.2

[PATCH 1/1] i2c: at91: fix code checker warnings

2015-06-11 Thread Cyrille Pitchen
buf_len is a size_t, so unsigned but was tested with '= 0'. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index

Re: [PATCH 0/1] i2c: at91: fix code checker warnings

2015-06-11 Thread Cyrille Pitchen
Hi all, this patch was made after applying the previous series [PATCH v6 0/6] i2c: at91: add support to FIFOs and alternative command, which was already accepted. Best Regards, Cyrille Le 11/06/2015 11:16, Cyrille Pitchen a écrit : ChangeLog v1: This patch fixes somes code checker

[PATCH v6 3/6] i2c: at91: update documentation for DT bindings

2015-06-09 Thread Cyrille Pitchen
add a new value atmel,sama5d2-i2c for the compatible property. add a new optional property atmel,fifo-size to enable FIFO support when available. add missing optional properties dmas and dma-names. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- Documentation/devicetree/bindings/i2c

[PATCH v6 4/6] i2c: at91: add support for new alternative command mode

2015-06-09 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH v6 5/6] i2c: at91: print hardware version

2015-06-09 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c

[PATCH v6 6/6] i2c: at91: add support to FIFOs

2015-06-09 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 147 +- 1 file changed, 130 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b

[PATCH v6 1/6] i2c: at91: fix a race condition when using the DMA controller

2015-06-09 Thread Cyrille Pitchen
. However to unify the management of the TXCOMP bit when the DMA controller is used, the TXCOMP interrupt is now enabled by the DMA callbacks for both TX and RX transfers. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com Cc: sta...@vger.kernel.org #3.10 and later --- drivers/i2c/busses/i2c

[PATCH v6 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-09 Thread Cyrille Pitchen
transfers take advantage of FIFOs. Cyrille Pitchen (6): i2c: at91: fix a race condition when using the DMA controller i2c: at91: use BIT() macro to define register bits i2c: at91: update documentation for DT bindings i2c: at91: add support for new alternative command mode i2c: at91: print

[PATCH v6 2/6] i2c: at91: use BIT() macro to define register bits

2015-06-09 Thread Cyrille Pitchen
This patch just fixes typo before applying later patches which will use register bits with index above 16. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH v4 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-03 Thread Cyrille Pitchen
access to the Transmit Holding Register. Also the RX FIFO allows to read up to 4 data in a single access to the Receive Holding Register. Currently only DMA transfers take advantage of FIFOs. Cyrille Pitchen (6): i2c: at91: fix a race condition when using the DMA controller i2c: at91: use BIT

[PATCH v4 6/6] i2c: at91: add support to FIFOs

2015-06-03 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 146 +- 1 file changed, 129 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b

[PATCH v4 4/6] i2c: at91: add support for new alternative command mode

2015-06-03 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH v4 5/6] i2c: at91: print hardware version

2015-06-03 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index

[PATCH v4 2/6] i2c: at91: use BIT() macro to define register bits

2015-06-03 Thread Cyrille Pitchen
This patch just fixes typo before applying later patches which will use register bits with index above 16. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH v5 1/6] i2c: at91: fix a race condition when using the DMA controller

2015-06-03 Thread Cyrille Pitchen
. However to unify the management of the TXCOMP bit when the DMA controller is used, the TXCOMP interrupt is now enabled by the DMA callbacks for both TX and RX transfers. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com Cc: sta...@vger.kernel.org #3.10 and later --- drivers/i2c/busses/i2c

[PATCH v5 6/6] i2c: at91: add support to FIFOs

2015-06-03 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 147 +- 1 file changed, 130 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b

[PATCH v5 2/6] i2c: at91: use BIT() macro to define register bits

2015-06-03 Thread Cyrille Pitchen
This patch just fixes typo before applying later patches which will use register bits with index above 16. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH v5 3/6] i2c: at91: update documentation for DT bindings

2015-06-03 Thread Cyrille Pitchen
add a new value atmel,at91sama5d2-i2c for the compatible property. add a new optional property atmel,fifo-size to enable FIFO support when available. add missing optional properties dmas and dma-names. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- Documentation/devicetree/bindings

[PATCH v5 5/6] i2c: at91: print hardware version

2015-06-03 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c

[PATCH v5 4/6] i2c: at91: add support for new alternative command mode

2015-06-03 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH v5 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-03 Thread Cyrille Pitchen
to reduce number I/O accesses: for instance, the TX FIFO allows to write up to 4 data in a single access to the Transmit Holding Register. Also the RX FIFO allows to read up to 4 data in a single access to the Receive Holding Register. Currently only DMA transfers take advantage of FIFOs. Cyrille

[PATCH v3 4/6] i2c: at91: add support for new alternative command mode

2015-06-02 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH v3 3/6] i2c: at91: fix a race condition when using the DMA controller

2015-06-02 Thread Cyrille Pitchen
. However to unify the management of the TXCOMP bit when the DMA controller is used, the TXCOMP interrupt is now enabled by the DMA callbacks for both TX and RX transfers. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 70

[PATCH v3 2/6] i2c: at91: update documentation for DT bindings

2015-06-02 Thread Cyrille Pitchen
add a new value atmel,at91sama5d2-i2c for the compatible property. add a new optional property atmel,fifo-size to enable FIFO support when available. add missing optional properties dmas and dma-names. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- Documentation/devicetree/bindings

[PATCH v3 0/6] i2c: at91: add support to FIFOs and alternative command

2015-06-02 Thread Cyrille Pitchen
to reduce number I/O accesses: for instance, the TX FIFO allows to write up to 4 data in a single access to the Transmit Holding Register. Also the RX FIFO allows to read up to 4 data in a single access to the Receive Holding Register. Currently only DMA transfers take advantage of FIFOs. Cyrille

[PATCH v3 5/6] i2c: at91: print hardware version

2015-06-02 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index

[PATCH v3 6/6] i2c: at91: add support to FIFOs

2015-06-02 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 146 +- 1 file changed, 129 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b

[PATCH v2 0/5] i2c: at91: add support to FIFOs and alternative command

2015-06-01 Thread Cyrille Pitchen
to the Receive Holding Register. Currently only DMA transfers take advantage of FIFOs. Cyrille Pitchen (5): i2c: at91: use BIT() macro to define register bits i2c: at91: update documentation for DT bindings i2c: at91: add support for new alternative command mode i2c: at91: print hardware version

[PATCH v2 1/5] i2c: at91: use BIT() macro to define register bits

2015-06-01 Thread Cyrille Pitchen
This patch just fixes typo before applying later patches which will use register bits with index above 16. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[PATCH v2 2/5] i2c: at91: update documentation for DT bindings

2015-06-01 Thread Cyrille Pitchen
add a new value atmel,at91sama5d2-i2c for the compatible property. add a new optional property atmel,fifo-size to enable FIFO support when available. add missing optional properties dmas and dma-names. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- Documentation/devicetree/bindings

[PATCH v2 4/5] i2c: at91: print hardware version

2015-06-01 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index

[PATCH v2 5/5] i2c: at91: add support to FIFOs

2015-06-01 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 146 +- 1 file changed, 129 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b

[PATCH v2 3/5] i2c: at91: add support for new alternative command mode

2015-06-01 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH 2/3] i2c: at91: print hardware version

2015-05-29 Thread Cyrille Pitchen
The probe() function now prints the hardware version of the I2C controller Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index

[PATCH 1/3] i2c: at91: add support for new alternative command mode

2015-05-29 Thread Cyrille Pitchen
of the ACR is not used so its Data Length 8bit counter is cleared. For each byte sent or received by the device, the Data Length 8bit counter is decremented. When it reaches 0, a STOP condition is automatically sent. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses

[PATCH 0/3] i2c: at91: add support to FIFOs and alternative command

2015-05-29 Thread Cyrille Pitchen
advantage of FIFOs. Cyrille Pitchen (3): i2c: at91: add support for new alternative command mode i2c: at91: print hardware version i2c: at91: add support to FIFOs drivers/i2c/busses/i2c-at91.c | 347 +++--- 1 file changed, 288 insertions(+), 59 deletions

[PATCH 3/3] i2c: at91: add support to FIFOs

2015-05-29 Thread Cyrille Pitchen
properly in the I2C controller node of the device tree. Signed-off-by: Cyrille Pitchen cyrille.pitc...@atmel.com --- drivers/i2c/busses/i2c-at91.c | 146 +- 1 file changed, 129 insertions(+), 17 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b