Re: [PATCH] i2c: Add support SuperH SH7734 I2C bus controller

2012-07-19 Thread Nobuhiro Iwamatsu
Hi, Phil. phil.edwor...@renesas.com さんは書きました: > Hi Iwamatsu-san, > >> Date: 16/04/2012 01:58 >> Subject: Re: [PATCH] i2c: Add support SuperH SH7734 I2C bus controller >> Sent by: linux-sh-ow...@vger.kernel.org >> >> Kuninori Morimoto さんは書きました: >>> Hi Iwamatsu-san >>> > I guess R-Car is not sa

Re: [PATCH] I2C: SiByte: Convert the driver to make use of interrupts

2012-07-19 Thread Maciej W. Rozycki
On Sat, 30 Jun 2012, Matt Turner wrote: > I'm not going to have time to do this. :( > > I had another look at the code, and I'm not sure I really understand > it well enough to address your concerns. I'll try then, as soon as I can. > Good thing there are only about three users with this mothe

[PATCHv5 17/18] i2c: omap: get rid of the "complete" label

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi we can ack stat and complete the command from the errata handling itself. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/

[PATCHv5 03/18] i2c: omap: decrease indentation level on data handling

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi The patch intends to decrease the indentation level on the data handling by using the fact that else of if (dev->buf_len) is same as if (!dev->buf_len) if (dev->buf_len) { aaa; } else { bbb; break; } to if (!dev->buf_len) { bbb; break;

[PATCHv5 11/18] i2c: omap: switch to platform_get_irq()

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi that's a nice helper from drivers core which will give us the exact IRQ number, instead of a pointer to an IRQ resource. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 12 +++- 1 files changed, 7 insertions(+), 5 dele

[PATCHv5 06/18] i2c: omap: split out [XR]DR and [XR]RDY

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi While they do pretty much the same thing, there are a few peculiarities. Specially WRT erratas, it's best to split those out and re-factor the read/write loop to another function which both cases call. This last part will be done on another patch. While at that, also avoid an

[PATCHv5 04/18] i2c: omap: add blank lines

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi trivial patch to aid readability. No functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/buss

[PATCHv5 01/18] i2c: omap: switch to devm_* API

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi that helps deleting some boiler plate code and lets driver-core manage our resources for us. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 41 - 1 files changed, 12 insertions(+), 29 d

[PATCHv5 09/18] i2c: omap: switch over to do {} while loop

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi this will make sure that we execute at least once. No functional changes otherwise. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/drive

[PATCHv5 16/18] i2c: omap: resize fifos before each message

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi This patch will try to avoid the usage of draining feature by reconfiguring the FIFO the start condition of each message based on the message's size. By doing that, we will be better utilizing the FIFO when doing big transfers. While at that also drop the now unneeded check f

[PATCHv5 18/18] i2c: omap: remove redundant status read

2012-07-19 Thread Shubhrajyoti D
Remove the redundant read of the status register. Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 2e48da9..7ad24ac 100644 --- a/drivers/i2

[PATCHv5 15/18] i2c: omap: simplify IRQ exit path

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi instead of having multiple return points, use a goto statement to make that clearer. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 20 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/driv

[PATCHv5 00/18] I2C big cleanup

2012-07-19 Thread Shubhrajyoti D
Changes since v1: - removed tabification on patch 6/17 - removed dev_err() which was introduced on patch 09/17 Changes since v2: - do not set full fifo depth in the RDR interrupt. - some changelog updates. - rebase to the Wolfram's tree. Changes since v3:

[PATCHv5 07/18] i2c: omap: improve i462 errata handling

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi Make it not depend on ISR's local variables in order to make it easier to re-factor the transmit data loop. Also since we are waiting for XUDF(Transmitter underflow) just before writing data lets not flag the underflow. This is anyways going to go once we write the data. Signe

[PATCHv5 10/18] i2c: omap: ack IRQ in parts

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi According to flow diagrams on OMAP TRMs, we should ACK the IRQ as they happen. Signed-off-by: Felipe Balbi [ack the stat OMAP_I2C_STAT_AL in case of arbitration lost] Signed-off-by: Shubhrajyoti D --- v5 - ack the OMAP_I2C_STAT_AL. drivers/i2c/busses/i2c-omap.c | 28

[PATCHv5 12/18] i2c: omap: bus: add a receiver flag

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi that way we can ignore TX IRQs while in receiver mode and ignore RX IRQs while in transmitter mode. Signed-off-by: Felipe Balbi [Trivial formatting changes] Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c |8 1 files changed, 8 insertions(+), 0

[PATCHv5 02/18] i2c: omap: simplify num_bytes handling

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi trivial patch, no functional changes If the fifo is disabled or fifo_size is 0 the num_bytes is set to 1. Else it is set to fifo_size or in case of a draining interrupt the remaining bytes in the buff stat. So the zero check is redundant and can be safely optimised. Signed-of

[PATCHv5 14/18] i2c: omap: always return IRQ_HANDLED

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi otherwise we could get our IRQ line disabled due to many spurious IRQs. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/driv

[PATCHv5 05/18] i2c: omap: simplify omap_i2c_ack_stat()

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi stat & BIT(1) is the same as BIT(1), so let's simplify things a bit by removing "stat &" from all omap_i2c_ack_stat() calls. Code snippet (extremely simplified): if (stat & NACK) { ... omap_i2c_ack_stat(dev, stat & NACK); } if (stat & RDR) { ...

[PATCHv5 08/18] i2c: omap: re-factor receive/transmit data loop

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi re-factor the common parts to a separate function, so that code is easier to read and understand. No functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 204 1 files cha

[PATCHv5 13/18] i2c: omap: simplify errata check

2012-07-19 Thread Shubhrajyoti D
From: Felipe Balbi omap_i2c_dev is allocated with kzalloc(), so we need not initialize b_hw to zero. Signed-off-by: Felipe Balbi Signed-off-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-o

Re: OMAP: send i2c message ignoring NAK

2012-07-19 Thread Shubhrajyoti
On Thursday 19 July 2012 06:35 PM, Yegor Yefremov wrote: >> Another request. Can you disable the NACK interrupt on the ignore and >> > enable back? >> > >> > Also let me know if you know of any of the panda or sdp peripherals >> > which could keep going on >> > NACK. > I don't know any :-( This is

Re: OMAP: send i2c message ignoring NAK

2012-07-19 Thread Yegor Yefremov
On Tue, Jul 17, 2012 at 4:01 PM, Shubhrajyoti Datta wrote: > On Tue, Jul 17, 2012 at 3:01 PM, Yegor Yefremov > wrote: >> On Thu, Jul 12, 2012 at 7:24 AM, Datta, Shubhrajyoti >> wrote: > [...] >>> On Wed, Jul 11, 2012 at 10:22 PM, Shubhrajyoti wrote: > > >> >> Thank you for the patch and sorry f

[PATCH] i2c-gpio: Add support for deferred probing

2012-07-19 Thread Jean Delvare
GPIOs may not be available immediately when i2c-gpio looks for them. Implement support for deferred probing so that probing can be attempted again later when GPIO pins are finally available. Signed-off-by: Jean Delvare Cc: Haavard Skinnemoen --- A little more changes were needed than I initially