* [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
@ 2009-07-14 21:19 Sonasath, Moiz
2009-07-14 22:21 ` Menon, Nishanth
0 siblings, 1 reply; 5+ messages in thread
From: Sonasath, Moiz @ 2009-07-14 21:19 UTC (permalink / raw)
To: linux-omap@vger.kernel.org; +Cc: Kamat, Nishant, Paul Walmsley
In case of a NACK or ARDY or AL interrupt, complete the request.
There is no need to service the RRDY/RDR or XRDY/XDR interrupts.
Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt Method,
in F/S and HS Modes
http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf
Signed-off-by: Moiz Sonasath<m-sonasath@ti.com>
Signed-off-by: Vikram Pandita<vikram.pandita@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index d280acf..05b5e4c 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
err |= OMAP_I2C_STAT_AL;
}
if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
- OMAP_I2C_STAT_AL))
+ OMAP_I2C_STAT_AL)) {
omap_i2c_complete_cmd(dev, err);
+ return IRQ_HANDLED;
+ }
if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
u8 num_bytes = 1;
if (dev->fifo_size) {
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
2009-07-14 21:19 [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR Sonasath, Moiz
@ 2009-07-14 22:21 ` Menon, Nishanth
2009-07-15 15:25 ` Sonasath, Moiz
0 siblings, 1 reply; 5+ messages in thread
From: Menon, Nishanth @ 2009-07-14 22:21 UTC (permalink / raw)
To: Sonasath, Moiz, linux-omap@vger.kernel.org; +Cc: Kamat, Nishant, Paul Walmsley
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Sonasath, Moiz
> Sent: Tuesday, July 14, 2009 4:20 PM
> To: linux-omap@vger.kernel.org
> Cc: Kamat, Nishant; Paul Walmsley
> Subject: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the
> ISR
>
>
> In case of a NACK or ARDY or AL interrupt, complete the request.
> There is no need to service the RRDY/RDR or XRDY/XDR interrupts.
>
> Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt
> Method,
> in F/S and HS Modes
>
> http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf
>
> Signed-off-by: Moiz Sonasath<m-sonasath@ti.com>
> Signed-off-by: Vikram Pandita<vikram.pandita@ti.com>
> ---
> drivers/i2c/busses/i2c-omap.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index d280acf..05b5e4c 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
> err |= OMAP_I2C_STAT_AL;
> }
> if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
> - OMAP_I2C_STAT_AL))
> + OMAP_I2C_STAT_AL)) {
> omap_i2c_complete_cmd(dev, err);
> + return IRQ_HANDLED;
> + }
What is the status of IRQ_STAT register? Who will clear that if we return immediately from ISR? Isr will be reinvoked and we'd handle the same anyways..
I think this conflicts with [1]
Regards,
Nishanth Menon
Ref:
[1] http://patchwork.kernel.org/patch/32332/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
2009-07-14 22:21 ` Menon, Nishanth
@ 2009-07-15 15:25 ` Sonasath, Moiz
2009-07-15 21:37 ` Nishanth Menon
0 siblings, 1 reply; 5+ messages in thread
From: Sonasath, Moiz @ 2009-07-15 15:25 UTC (permalink / raw)
To: Menon, Nishanth, linux-omap@vger.kernel.org; +Cc: Kamat, Nishant, Paul Walmsley
Hello Nishant,
Comments inlined:
Regards
Moiz Sonasath
Linux Baseport Team, Dallas
214-567-5514
-----Original Message-----
From: Menon, Nishanth
Sent: Tuesday, July 14, 2009 5:22 PM
To: Sonasath, Moiz; linux-omap@vger.kernel.org
Cc: Kamat, Nishant; Paul Walmsley
Subject: RE: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Sonasath, Moiz
> Sent: Tuesday, July 14, 2009 4:20 PM
> To: linux-omap@vger.kernel.org
> Cc: Kamat, Nishant; Paul Walmsley
> Subject: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the
> ISR
>
>
> In case of a NACK or ARDY or AL interrupt, complete the request.
> There is no need to service the RRDY/RDR or XRDY/XDR interrupts.
>
> Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt
> Method,
> in F/S and HS Modes
>
> http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf
>
> Signed-off-by: Moiz Sonasath<m-sonasath@ti.com>
> Signed-off-by: Vikram Pandita<vikram.pandita@ti.com>
> ---
> drivers/i2c/busses/i2c-omap.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index d280acf..05b5e4c 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
> err |= OMAP_I2C_STAT_AL;
> }
> if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
> - OMAP_I2C_STAT_AL))
> + OMAP_I2C_STAT_AL)) {
> omap_i2c_complete_cmd(dev, err);
> + return IRQ_HANDLED;
> + }
What is the status of IRQ_STAT register? Who will clear that if we return immediately from ISR? Isr will be reinvoked and we'd handle the same anyways..
[Moiz]
Correct me if I am wrong, but you are referring to the OMAP_I2C_STAT_REG (which has the interrupt status information). This is actually ACKED just before going into the NACK|AL|ARDY error cases. I suppose a few days back you also sent out a patch to change this to ACK all interrupts other than RRDY/RDR and XRDY/XDR as we have to ACK these only after we service them.
I think this conflicts with [1]
[Moiz]
Actually, it does not conflict with [1], as [1] changes the later part of the code allowing this patch to be applied cleanly.
Regards,
Nishanth Menon
Ref:
[1] http://patchwork.kernel.org/patch/32332/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
2009-07-15 15:25 ` Sonasath, Moiz
@ 2009-07-15 21:37 ` Nishanth Menon
0 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2009-07-15 21:37 UTC (permalink / raw)
To: Sonasath, Moiz; +Cc: linux-omap@vger.kernel.org, Kamat, Nishant, Paul Walmsley
Sonasath, Moiz had written, on 07/15/2009 10:25 AM, the following:
>> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
>> index d280acf..05b5e4c 100644
>> --- a/drivers/i2c/busses/i2c-omap.c
>> +++ b/drivers/i2c/busses/i2c-omap.c
>> @@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
>> err |= OMAP_I2C_STAT_AL;
>> }
>> if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
>> - OMAP_I2C_STAT_AL))
>> + OMAP_I2C_STAT_AL)) {
>> omap_i2c_complete_cmd(dev, err);
>> + return IRQ_HANDLED;
>> + }
> What is the status of IRQ_STAT register? Who will clear that if we return immediately from ISR? Isr will be reinvoked and we'd handle the same anyways..
>
> [Moiz]
> Correct me if I am wrong, but you are referring to the OMAP_I2C_STAT_REG (which has the interrupt status information).
>This is actually ACKED just before going into the NACK|AL|ARDY error
cases. I suppose a few days back you also sent out a
>atch to change this to ACK all interrupts other than RRDY/RDR and
XRDY/XDR as we have to ACK these only after we service them.
>
> I think this conflicts with [1]
> [Moiz]
> Actually, it does not conflict with [1], as [1] changes the later part of the code allowing this patch to be applied cleanly.
Got it. Thanks for clarifying. my bad.
Acked-by: Nishanth Menon <nm@ti.com>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR
@ 2009-07-21 15:14 Sonasath, Moiz
0 siblings, 0 replies; 5+ messages in thread
From: Sonasath, Moiz @ 2009-07-21 15:14 UTC (permalink / raw)
To: linux-i2c@vger.kernel.org; +Cc: linux-omap@vger.kernel.org
In case of a NACK or ARDY or AL interrupt, complete the request.
There is no need to service the RRDY/RDR or XRDY/XDR interrupts.
Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt Method,
in F/S and HS Modes
http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf
Signed-off-by: Moiz Sonasath<m-sonasath@ti.com>
Signed-off-by: Vikram pandita<vikram.pandita@ti.com>
---
drivers/i2c/busses/i2c-omap.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index d280acf..05b5e4c 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id)
err |= OMAP_I2C_STAT_AL;
}
if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
- OMAP_I2C_STAT_AL))
+ OMAP_I2C_STAT_AL)) {
omap_i2c_complete_cmd(dev, err);
+ return IRQ_HANDLED;
+ }
if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) {
u8 num_bytes = 1;
if (dev->fifo_size) {
--
1.5.6.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-21 15:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 21:19 [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR Sonasath, Moiz
2009-07-14 22:21 ` Menon, Nishanth
2009-07-15 15:25 ` Sonasath, Moiz
2009-07-15 21:37 ` Nishanth Menon
-- strict thread matches above, loose matches on Subject: below --
2009-07-21 15:14 Sonasath, Moiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox