i2c: fix missing handling of errata I2C_OMAP3_1P153
Subsystems (4)
PATCH 1/1 i2c: fix missing handling of errata I2C_OMAP3_1P153
From: Tasslehoff Kjappfot <[email protected]>
i2c_prope set the dev->errata flag, but omap_i2c_init cleared the flag again. Move the errata handling to i2c_init.
--- drivers/i2c/busses/i2c-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-omap.c +4 -3
@@ -473,6 +473,10 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev <=OMAP_I2C_REV_ON_3430 ) + dev->errata |=I2C_OMAP3_1P153 ; + +/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
@@ -1058,9 +1062,6 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG ) &0xff ; -if (dev->rev <=OMAP_I2C_REV_ON_3430 ) - dev->errata |=I2C_OMAP3_1P153 ; -if (!(dev->flags &OMAP_I2C_FLAG_NO_FIFO )) {u16 s;
Signature · 1 line
1.7.5.4
Quoted 25 lines · On 02/06/2012 03:33 PM, [email protected] wrote:
From: Tasslehoff Kjappfot<[email protected]>
i2c_propeset thedev->errataflag, butomap_i2c_initcleared the flag again. Move the errata handling toi2c_init.Signed-off-by Tasslehoff Kjappfot<[email protected]>--- drivers/i2c/busses/i2c-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)drivers/i2c/busses/i2c-omap.c +4
-0@@ -473,6 +473,10 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)if (dev->flags&OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev<=OMAP_I2C_REV_ON_3430 ) + dev->errata |=I2C_OMAP3_1P153 ; + +/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
drivers/i2c/busses/i2c-omap.c omap_i2c_probe(struct platform_device *pdev) · line 1067
Quoted 9 lines
drivers/i2c/busses/i2c-omap.c +0
-3@@ -1058,9 +1062,6 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG )&0xff ; -if (dev->rev<=OMAP_I2C_REV_ON_3430 ) - dev->errata |=I2C_OMAP3_1P153 ; -if (!(dev->flags&OMAP_I2C_FLAG_NO_FIFO )) {u16 s;
Not the easiest patch to test, but it would be nice if someone could review it.
- Tasslehoff
Quoted 4 lines · On Monday 06 February 2012 08:03 PM, [email protected] wrote:
From: Tasslehoff Kjappfot <[email protected]>
i2c_propeset thedev->errataflag, butomap_i2c_initcleared the flag again. Move the errata handling toi2c_init.
also in my opinion moving the reset to 0 should be moved to probe.
also you may want to cc linux-i2c for the driver patches.
Quoted 30 lines
Signed-off-by Tasslehoff Kjappfot <[email protected]>--- drivers/i2c/busses/i2c-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)drivers/i2c/busses/i2c-omap.c +4
-3@@ -473,6 +473,10 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev <=OMAP_I2C_REV_ON_3430 ) + dev->errata |=I2C_OMAP3_1P153 ; + +/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |@@ -1058,9 +1062,6 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG ) &0xff ; -if (dev->rev <=OMAP_I2C_REV_ON_3430 ) - dev->errata |=I2C_OMAP3_1P153 ; -if (!(dev->flags &OMAP_I2C_FLAG_NO_FIFO )) {u16 s;
Quoted 6 lines · Shubhrajyoti
Quoted 4 lines · On Monday 06 February 2012 08:03 PM, [email protected] wrote:
From: Tasslehoff Kjappfot<[email protected]>
i2c_propeset thedev->errataflag, butomap_i2c_initcleared the flag again. Move the errata handling toi2c_init.also in my opinion moving the reset to 0 should be moved to probe.
Do you mean moving all setting of the errate flag to probe instead of having it in init?
Quoted 1 line
also you may want to cc linux-i2c for the driver patches.
Done.
Quoted 31 lines
Quoted 30 lines
Signed-off-by Tasslehoff Kjappfot<[email protected]>--- drivers/i2c/busses/i2c-omap.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)drivers/i2c/busses/i2c-omap.c +4
-3@@ -473,6 +473,10 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)if (dev->flags&OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev<=OMAP_I2C_REV_ON_3430 ) + dev->errata |=I2C_OMAP3_1P153 ; + +/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |@@ -1058,9 +1062,6 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG )&0xff ; -if (dev->rev<=OMAP_I2C_REV_ON_3430 ) - dev->errata |=I2C_OMAP3_1P153 ; -if (!(dev->flags&OMAP_I2C_FLAG_NO_FIFO )) {u16 s;
A message that is not in the archive (sent off-list or not yet received): 1328538811-13097-1-git-send-email-tasskjapp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/1 i2c: fix missing handling of errata I2C_OMAP3_1P153
i2c_prope set the dev->errata flag, but omap_i2c_init cleared the flag again. Move the errata handling to i2c_probe.
--- drivers/i2c/busses/i2c-omap.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-omap.c +5 -5
@@ -468,11 +468,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)/* Take the I2C module out of reset: */ omap_i2c_write_reg (dev,OMAP_I2C_CON_REG ,OMAP_I2C_CON_EN ); - dev->errata =0 ; - -if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) - dev->errata |=I2C_OMAP_ERRATA_I207 ; -/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
@@ -1058,6 +1053,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG ) &0xff ; + dev->errata =0 ; + +if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) + dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev <=OMAP_I2C_REV_ON_3430 ) dev->errata |=I2C_OMAP3_1P153 ;
Signature · 1 line
1.7.5.4
PATCH v2 1/1 i2c: fix missing handling of errata I2C_OMAP3_1P153
Sorry about the bad mails. First time I use git send-email to follow up on a patch, and it seems I need to read up a bit more on it.
Anyway.
This patch is tested on our custom board based on Beagleboard rev C3.
From 7c1e2c14bccb16c20dc7d93088b12ac6e6e351a3 Mon Sep 17 00:00:00 2001
From: Tasslehoff Kjappfot <[email protected]>
Date: Mon, 6 Feb 2012 14:14:23 +0100
Subject: [PATCH] i2c: fix missing handling of errata I2C_OMAP3_1P153
i2c_prope set the dev->errata flag, but omap_i2c_init cleared the flag again. Move the errata handling to i2c_probe.
--- drivers/i2c/busses/i2c-omap.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-omap.c +5 -5
@@ -468,11 +468,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)/* Take the I2C module out of reset: */ omap_i2c_write_reg (dev,OMAP_I2C_CON_REG ,OMAP_I2C_CON_EN ); - dev->errata =0 ; - -if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) - dev->errata |=I2C_OMAP_ERRATA_I207 ; -/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
@@ -1058,6 +1053,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG ) &0xff ; + dev->errata =0 ; + +if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) + dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev <=OMAP_I2C_REV_ON_3430 ) dev->errata |=I2C_OMAP3_1P153 ;
Signature · 1 line
1.7.5.4
Hi ,
Quoted 6 lines · Tasslehoff Kjappfot
Sorry about the bad mails. First time I use git send-email to follow up on a patch, and it seems I need to read up a bit more on it.
Anyway.
This patch is tested on our custom board based on Beagleboard rev C3.
thanks for the testing . may be include it in the changelogs . Just a suggestion not an objection to the patch.
Quoted 8 lines
From
7c1e2c14bccb16c20dc7d93088b12ac6e6e351a3Mon Sep 17 00:00:00 2001
From: Tasslehoff Kjappfot <[email protected]>
Date: Mon, 6 Feb 2012 14:14:23 +0100
Subject: [PATCH] i2c: fix missing handling of errataI2C_OMAP3_1P153
i2c_prope
Nitpick : probe
set the dev->errata flag, but omap_i2c_init cleared the flag
Quoted 40 lines
again. Move the errata handling to
i2c_probe.Signed-off-by Tasslehoff Kjappfot <[email protected]>---
drivers/i2c/busses/i2c-omap.c | 10 +++++-----1 files changed, 5 insertions(+), 5 deletions(-)drivers/i2c/busses/i2c-omap.c +0
-5@@ -468,11 +468,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) /* Take the I2C module out of reset: */ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); - dev->errata = 0; - - if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207) - dev->errata |= I2C_OMAP_ERRATA_I207; - /* Enable interrupts */dev->iestate = (
OMAP_I2C_IE_XRDY|OMAP_I2C_IE_RRDY|OMAP_I2C_IE_ARDY|OMAP_I2C_IE_NACK|drivers/i2c/busses/i2c-omap.c +5
-1@@ -1058,6 +1053,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; + dev->errata = 0; + + if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207) + dev->errata |= I2C_OMAP_ERRATA_I207; + if (dev->rev <= OMAP_I2C_REV_ON_3430) dev->errata |= I2C_OMAP3_1P153; --1.7.5.4
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" inthe body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From 0195dcf606b0ad069d8b5bc56cb877ff65ebea22 Mon Sep 17 00:00:00 2001
From: Tasslehoff Kjappfot <[email protected]>
Date: Mon, 6 Feb 2012 14:14:23 +0100
Subject: [PATCH] i2c: fix missing handling of errata I2C_OMAP3_1P153
i2c_probe set the dev->errata flag, but omap_i2c_init cleared the flag again. Move the errata handling to i2c_probe.
--- drivers/i2c/busses/i2c-omap.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-omap.c +5 -5
@@ -468,11 +468,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)/* Take the I2C module out of reset: */ omap_i2c_write_reg (dev,OMAP_I2C_CON_REG ,OMAP_I2C_CON_EN ); - dev->errata =0 ; - -if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) - dev->errata |=I2C_OMAP_ERRATA_I207 ; -/* Enable interrupts */ dev->iestate = (OMAP_I2C_IE_XRDY | OMAP_I2C_IE_RRDY | OMAP_I2C_IE_ARDY | OMAP_I2C_IE_NACK |
@@ -1058,6 +1053,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev =omap_i2c_read_reg (dev,OMAP_I2C_REV_REG ) &0xff ; + dev->errata =0 ; + +if (dev->flags &OMAP_I2C_FLAG_APPLY_ERRATA_I207 ) + dev->errata |=I2C_OMAP_ERRATA_I207 ; +if (dev->rev <=OMAP_I2C_REV_ON_3430 ) dev->errata |=I2C_OMAP3_1P153 ;
Signature · 1 line
1.7.5.4
Shubhrajyoti Datta
Reviewed-by Shubhrajyoti DHello,
Quoted 9 lines · Tasslehoff Kjappfot
From
0195dcf606b0ad069d8b5bc56cb877ff65ebea22Mon Sep 17 00:00:00 2001From: Tasslehoff Kjappfot <[email protected]>
Date: Mon, 6 Feb 2012 14:14:23 +0100
Subject: [PATCH] i2c: fix missing handling of errataI2C_OMAP3_1P153
i2c_probeset thedev->errataflag, butomap_i2c_initcleared the flag again. Move the errata handling toi2c_probe.
Looks good to me.
Quoted 37 lines
Signed-off-by Tasslehoff Kjappfot <[email protected]>---
drivers/i2c/busses/i2c-omap.c | 10 +++++-----1 files changed, 5 insertions(+), 5 deletions(-)drivers/i2c/busses/i2c-omap.c +0
-5@@ -468,11 +468,6 @@ static int omap_i2c_init(struct omap_i2c_dev *dev) /* Take the I2C module out of reset: */ omap_i2c_write_reg(dev, OMAP_I2C_CON_REG, OMAP_I2C_CON_EN); - dev->errata = 0; - - if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207) - dev->errata |= I2C_OMAP_ERRATA_I207; - /* Enable interrupts */dev->iestate = (
OMAP_I2C_IE_XRDY|OMAP_I2C_IE_RRDY|OMAP_I2C_IE_ARDY|OMAP_I2C_IE_NACK|drivers/i2c/busses/i2c-omap.c +5
-1@@ -1058,6 +1053,11 @@ omap_i2c_probe(struct platform_device *pdev) dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG) & 0xff; + dev->errata = 0; + + if (dev->flags & OMAP_I2C_FLAG_APPLY_ERRATA_I207) + dev->errata |= I2C_OMAP_ERRATA_I207; + if (dev->rev <= OMAP_I2C_REV_ON_3430) dev->errata |= I2C_OMAP3_1P153; --1.7.5.4
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" inthe body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html