public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH V1 2/3] i2c: imx: only imx1 needs disable delay
Date: Sat, 17 Oct 2009 17:46:23 +0800	[thread overview]
Message-ID: <1255772784-11387-2-git-send-email-linuxzsc@gmail.com> (raw)
In-Reply-To: <1255772784-11387-1-git-send-email-linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

check cpu_is_mx1() when disable delay.

Signed-off-by: Richard Zhao <linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 6055e92..671d37c 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -225,11 +225,13 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
 		writeb(temp, i2c_imx->base + IMX_I2C_I2CR);
 		i2c_imx->stopped = 1;
 	}
-	/*
-	 * This delay caused by an i.MXL hardware bug.
-	 * If no (or too short) delay, no "STOP" bit will be generated.
-	 */
-	udelay(i2c_imx->disable_delay);
+	if (cpu_is_mx1()) {
+		/*
+		 * This delay caused by an i.MXL hardware bug.
+		 * If no (or too short) delay, no "STOP" bit will be generated.
+		 */
+		udelay(i2c_imx->disable_delay);
+	}
 
 	if (!i2c_imx->stopped)
 		i2c_imx_bus_busy(i2c_imx, 0);
-- 
1.6.0.4

  parent reply	other threads:[~2009-10-17  9:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-17  9:46 [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP Richard Zhao
     [not found] ` <1255772784-11387-1-git-send-email-linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-10-17  9:46   ` Richard Zhao [this message]
     [not found]     ` <1255772784-11387-2-git-send-email-linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-10-17  9:46       ` [PATCH V1 3/3] i2c: imx: disable clock when it's possible to save power Richard Zhao
2009-10-20 10:03   ` [PATCH V1 1/3] i2c: imx: check busy bit when START/STOP Richard Zhao
2009-10-21 14:11   ` Richard Zhao
2009-10-30  0:40   ` Ben Dooks
     [not found]     ` <20091030004025.GG13398-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2009-10-31  2:47       ` Richard Zhao
     [not found]         ` <4e090d470910301947y2cd4e95x88f500c6c008d97d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-10  2:55           ` Richard Zhao

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=1255772784-11387-2-git-send-email-linuxzsc@gmail.com \
    --to=linuxzsc-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-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