linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tasslehoff Kjappfot <tasskjapp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Tasslehoff Kjappfot
	<tasskjapp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] i2c: fix missing handling of errata I2C_OMAP3_1P153
Date: Tue, 14 Feb 2012 10:59:43 +0100	[thread overview]
Message-ID: <1329213583-20839-1-git-send-email-tasskjapp@gmail.com> (raw)
In-Reply-To: <1328538811-13097-1-git-send-email-tasskjapp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 801df60..d609ae2 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -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;
 
-- 
1.7.5.4

  parent reply	other threads:[~2012-02-14  9:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1328538811-13097-1-git-send-email-tasskjapp@gmail.com>
     [not found] ` <4F36A2F2.7040003@ti.com>
2012-02-14  8:55   ` [PATCH] i2c: fix missing handling of errata I2C_OMAP3_1P153 Tasslehoff Kjappfot
     [not found] ` <1328538811-13097-1-git-send-email-tasskjapp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-02-14  9:59   ` Tasslehoff Kjappfot [this message]
2012-02-14 10:15     ` [PATCH v2] " Tasslehoff Kjappfot
2012-02-16 11:36       ` Shubhrajyoti Datta
2012-02-17 12:19         ` [PATCH v3] " Tasslehoff Kjappfot
2012-02-17 12:40           ` Shubhrajyoti Datta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329213583-20839-1-git-send-email-tasskjapp@gmail.com \
    --to=tasskjapp-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).