linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
To: Haibo Chen <haibo.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] i2c: imx: Add arbitration lost check
Date: Sat, 20 Sep 2014 14:28:15 +0200	[thread overview]
Message-ID: <20140920122814.GD3850@katana> (raw)
In-Reply-To: <1409723527-30603-1-git-send-email-haibo.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

On Wed, Sep 03, 2014 at 01:52:07PM +0800, Haibo Chen wrote:
> According to the i.mx spec, for multimaster mode, if I2C is
> enabled when the bus is busy and asserts start, hardware inhibits
> the transmission, clears MSTA without signaling a stop, generate
> an interrupt, and set I2C_I2SR[IAL] to indicate a failed attempt
> to engage the bus, which means arbitration lost. In this case,
> we should first test I2C_I2SR[IAL], and clear this bit if it is
> set, and then I2C controller default to slave receive mode.
> 
> This patch check the IAL bit every time before an I2c transmission.
> if IAL is set, clear it and make I2C controller to default mode.
> 
> Signed-off-by: Haibo Chen <haibo.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Acked-by: Fugang Duan <B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> ---
> Changes for V2:
> -Use 'EAGAIN' instead of 'EIO' for arbitration lost
> -Modify the comment style
> 
>  drivers/i2c/busses/i2c-imx.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 613069b..ceff87c 100644

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-09-20 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03  5:52 [PATCH v2] i2c: imx: Add arbitration lost check Haibo Chen
     [not found] ` <1409723527-30603-1-git-send-email-haibo.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-09-18  6:48   ` Haibo.Chen-KZfg59tc24xl57MIdRCFDg
2014-09-20 12:28   ` Wolfram Sang [this message]

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=20140920122814.GD3850@katana \
    --to=wsa-z923lk4zbo2bacvfa/9k2g@public.gmane.org \
    --cc=B38611-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=haibo.chen-KZfg59tc24xl57MIdRCFDg@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;
as well as URLs for NNTP newsgroup(s).