From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Marc Reilly <marc@cpdesign.com.au>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] i2c-imx: wait for STOP before disabling controller
Date: Fri, 1 Oct 2010 05:29:54 +0200 [thread overview]
Message-ID: <20101001032954.GD25320@game.jcrosoft.org> (raw)
In-Reply-To: <1285903374-6825-1-git-send-email-marc@cpdesign.com.au>
On 13:22 Fri 01 Oct , Marc Reilly wrote:
> Makes sure that the STOP condition is transmitted before the I2C
> controller is disabled.
> This fixes a problem where writing to an external EEPROM was not working
> because the EEPROM waits until the STOP before initiating the write
> internally.
>
> Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
> ---
> drivers/i2c/i2c-imx.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i2c/i2c-imx.c b/drivers/i2c/i2c-imx.c
> index cc64d94..3e37441 100644
> --- a/drivers/i2c/i2c-imx.c
> +++ b/drivers/i2c/i2c-imx.c
> @@ -265,7 +265,9 @@ static void i2c_imx_stop(struct i2c_adapter *adapter)
> temp = readb(base + IMX_I2C_I2CR);
> temp &= ~(I2CR_MSTA | I2CR_MTX);
> writeb(temp, base + IMX_I2C_I2CR);
> - i2c_imx->stopped = 1;
> + /* wait for the stop condition to be send, otherwise the i2c
> + * controller is disabled before the STOP is sent completely */
> + i2c_imx->stopped = i2c_imx_bus_busy(adapter,0) ? 0 : 1;
please add a space after the ","
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2010-10-01 3:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 3:22 Marc Reilly
2010-10-01 3:29 ` Jean-Christophe PLAGNIOL-VILLARD [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=20101001032954.GD25320@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=barebox@lists.infradead.org \
--cc=marc@cpdesign.com.au \
/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