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

2015-06-03 Thread Cyrille Pitchen
ChangeLog v4: - replace 0x%x by %#x when printing I2C controller version - change the order of patches: the race condition bug fix becomes the first patch so it be can more easily applied to older kernels. v3: - fix braces {} coding style issue - split the alternative command patch into 2 patch

[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 --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-a

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

2015-06-03 Thread Cyrille Pitchen
For TX transactions, the TXCOMP bit in the Status Register is cleared when the first data is written into the Transmit Holding Register. In the lines from at91_do_twi_transfer(): at91_twi_write_data_dma(dev); at91_twi_write(dev, AT91_TWI_IER, AT91_TWI_TXCOMP); the TXCOMP interrupt may be enabled

[PATCH v4 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 --- Documentation/devicetree/bindings/i2c/i2c-at91.tx

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

2015-06-03 Thread Cyrille Pitchen
The alternative command mode was introduced to simplify the transmission of STOP conditions and to solve timing and latency issues around them. This mode relies on a new register, the Alternative Command Register, which must be set at the same time as the Master Mode Register. This new register wa

[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 --- 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 67b4f15..cbe6684 100644 --- a/d

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

2015-06-03 Thread Cyrille Pitchen
When FIFOs are available and enabled, the driver now configures the Atmel eXtended DMA Controller to perform word accesses instead of byte accesses when possible. The actual access width depends on the size of the buffer to transmit. To enable FIFO support the "atmel,fifo-size" property must be se

Re: [PATCH 12/12] i2c: pxa: enable/disable i2c module across msg xfer

2015-06-03 Thread Yi Zhang
On Tue, Jun 02, 2015 at 10:29:23PM +0530, Vaibhav Hiremath wrote: > > > On Tuesday 02 June 2015 10:22 PM, Vaibhav Hiremath wrote: > > > > > >On Thursday 28 May 2015 06:53 PM, Russell King - ARM Linux wrote: > >>On Thu, May 28, 2015 at 06:33:44PM +0530, Vaibhav Hiremath wrote: > >>>From: Yi Zhang

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

2015-06-03 Thread Wolfram Sang
On Wed, Jun 03, 2015 at 11:04:26AM +0200, Cyrille Pitchen wrote: > The probe() function now prints the hardware version of the I2C > controller. > > Signed-off-by: Cyrille Pitchen Kernel has already very much printout, so I don't see the gain in adding another one. At least, combine it with the

Re: [V4, 1/2] i2c: brcmstb: Add Broadcom settop SoC i2c controller driver

2015-06-03 Thread Wolfram Sang
On Tue, May 19, 2015 at 12:23:44PM -0400, Kamal Dasu wrote: > Adding support for i2c controller driver for Broadcom settop > SoCs. > > Signed-off-by: Kamal Dasu We are very close. > +/* Wait for device to be ready */ > +static int brcmstb_i2c_wait_if_busy(struct brcmstb_i2c_dev *dev) > +{ > +

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

2015-06-03 Thread Cyrille Pitchen
For TX transactions, the TXCOMP bit in the Status Register is cleared when the first data is written into the Transmit Holding Register. In the lines from at91_do_twi_transfer(): at91_twi_write_data_dma(dev); at91_twi_write(dev, AT91_TWI_IER, AT91_TWI_TXCOMP); the TXCOMP interrupt may be enabled

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

2015-06-03 Thread Cyrille Pitchen
ChangeLog v5: - print I2C controller version in an already existing dev_info() instead of adding a new one. v4: - replace 0x%x by %#x when printing I2C controller version - change the order of patches: the race condition bug fix becomes the first patch so it be can more easily applied to olde

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

2015-06-03 Thread Cyrille Pitchen
The alternative command mode was introduced to simplify the transmission of STOP conditions and to solve timing and latency issues around them. This mode relies on a new register, the Alternative Command Register, which must be set at the same time as the Master Mode Register. This new register wa

[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 --- drivers/i2c/busses/i2c-at91.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-a

[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 --- Documentation/devicetree/bindings/i2c/i2c-at91.tx

[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 --- 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-at91.c index 67b4f15..89a8e6

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

2015-06-03 Thread Cyrille Pitchen
When FIFOs are available and enabled, the driver now configures the Atmel eXtended DMA Controller to perform word accesses instead of byte accesses when possible. The actual access width depends on the size of the buffer to transmit. To enable FIFO support the "atmel,fifo-size" property must be se

Re: [PATCH 12/12] i2c: pxa: enable/disable i2c module across msg xfer

2015-06-03 Thread Vaibhav Hiremath
On Wednesday 03 June 2015 04:26 PM, Yi Zhang wrote: On Tue, Jun 02, 2015 at 10:29:23PM +0530, Vaibhav Hiremath wrote: On Tuesday 02 June 2015 10:22 PM, Vaibhav Hiremath wrote: On Thursday 28 May 2015 06:53 PM, Russell King - ARM Linux wrote: On Thu, May 28, 2015 at 06:33:44PM +0530, Vaib

Re: [PATCH 05/12] i2c: pxa: Add bus reset functionality

2015-06-03 Thread Vaibhav Hiremath
On Tuesday 02 June 2015 06:42 PM, Linus Walleij wrote: On Thu, May 28, 2015 at 3:03 PM, Vaibhav Hiremath wrote: From: Rob Herring Since there is some problematic i2c slave devices on some platforms such as dkb (sometimes), it will drop down sda and make i2c bus hang, at that time, it need

Re: [PATCH 00/21] On-demand device registration

2015-06-03 Thread grygorii.stras...@linaro.org
Hi Tomeu, On 05/28/2015 07:33 AM, Rob Herring wrote: > On Mon, May 25, 2015 at 9:53 AM, Tomeu Vizoso > wrote: >> I have a problem with the panel on my Tegra Chromebook taking longer than >> expected to be ready during boot (Stéphane Marchesin reported what is >> basically the same issue in [0]),

Re: [PATCH 00/21] On-demand device registration

2015-06-03 Thread Rob Clark
On Mon, May 25, 2015 at 10:53 AM, Tomeu Vizoso wrote: > Hello, > > I have a problem with the panel on my Tegra Chromebook taking longer than > expected to be ready during boot (Stéphane Marchesin reported what is > basically the same issue in [0]), and have looked into ordered probing as a > bette

Re: [PATCH 04/12] i2c: pxa: Add support for pxa910/988 & new configuration features

2015-06-03 Thread Yi Zhang
On Fri, May 29, 2015 at 10:22:27PM +0200, Robert Jarzmik wrote: > Vaibhav Hiremath writes: > > > @@ -167,6 +184,8 @@ struct pxa_i2c { > > #define _ICR(i2c) ((i2c)->reg_icr) > > #define _ISR(i2c) ((i2c)->reg_isr) > > #define _ISAR(i2c) ((i2c)->reg_isar) > > +#define _ILCR(i2c) ((i2c)->reg_ilc

Re: [PATCH 04/12] i2c: pxa: Add support for pxa910/988 & new configuration features

2015-06-03 Thread Vaibhav Hiremath
On Thursday 04 June 2015 08:01 AM, Yi Zhang wrote: On Fri, May 29, 2015 at 10:22:27PM +0200, Robert Jarzmik wrote: Vaibhav Hiremath writes: @@ -167,6 +184,8 @@ struct pxa_i2c { #define _ICR(i2c) ((i2c)->reg_icr) #define _ISR(i2c) ((i2c)->reg_isr) #define _ISAR(i2c)((i2c)->

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

2015-06-03 Thread Ludovic Desroches
For the whole set of patches: Acked-by: Ludovic Desroches Thanks Cyrille On Wed, Jun 03, 2015 at 06:25:16PM +0200, Cyrille Pitchen wrote: > ChangeLog > > v5: > - print I2C controller version in an already existing dev_info() instead of > adding a new one. > > v4: > - replace 0x%x by %#x when

Re: [PATCH 12/12] i2c: pxa: enable/disable i2c module across msg xfer

2015-06-03 Thread Yi Zhang
On Wed, Jun 03, 2015 at 12:59:23AM +0800, Vaibhav Hiremath wrote: > > > On Tuesday 02 June 2015 10:22 PM, Vaibhav Hiremath wrote: > > > > > > On Thursday 28 May 2015 06:53 PM, Russell King - ARM Linux wrote: > >> On Thu, May 28, 2015 at 06:33:44PM +0530, Vaibhav Hiremath wrote: > >>> From: Yi Zha