From: Wolfram Sang <wsa@the-dreams.de>
To: ying.zhang22455@nxp.com
Cc: linux-i2c@vger.kernel.org, xiaobo.xie@nxp.com, york.sun@nxp.com,
Ying Zhang <b40530@freescale.com>
Subject: Re: [PATCH 1/2] i2c: ls1/ls2: add workaround for erratum ERR010027
Date: Tue, 26 Apr 2016 23:29:19 +0200 [thread overview]
Message-ID: <20160426212919.GF4587@katana> (raw)
In-Reply-To: <1453884283-33414-1-git-send-email-ying.zhang22455@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]
On Wed, Jan 27, 2016 at 04:44:42PM +0800, ying.zhang22455@nxp.com wrote:
> From: Ying Zhang <b40530@freescale.com>
>
> ERR010027/ERR008951: Attempting a start cycle while the
> bus is busy may generate a short clock pulse.
>
> Software must ensure that the I2C BUS is idle by checking the
> bus busy before switching to master mode and attempting a Start
> cycle.
>
> Signed-off-by: Ying Zhang <b40530@freescale.com>
> ---
> drivers/i2c/busses/i2c-imx.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index a2b132c..f1fe599 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -889,6 +889,13 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
>
> dev_dbg(&i2c_imx->adapter.dev, "<%s>\n", __func__);
>
> + /* workround for ERR010027: ensure that the I2C BUS is idle
> + before switching to master mode and attempting a Start cycle
> + */
Please use kernel coding style for comments.
> + result = i2c_imx_bus_busy(i2c_imx, 0);
> + if (result)
> + goto fail0;
This is wrong! You need 'goto out'. Please be careful.
> +
> result = pm_runtime_get_sync(i2c_imx->adapter.dev.parent);
> if (result < 0)
> goto out;
> --
> 2.1.0.27.g96db324
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-04-26 21:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 8:44 [PATCH 1/2] i2c: ls1/ls2: add workaround for erratum ERR010027 ying.zhang22455
2016-01-27 8:44 ` [PATCH 2/2] drivers/i2c/i2c-imx.c: improve i2c bus error recovery ying.zhang22455
2016-03-03 21:37 ` Wolfram Sang
2016-04-26 21:29 ` Wolfram Sang [this message]
2016-04-26 21:30 ` [PATCH 1/2] i2c: ls1/ls2: add workaround for erratum ERR010027 Wolfram Sang
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=20160426212919.GF4587@katana \
--to=wsa@the-dreams.de \
--cc=b40530@freescale.com \
--cc=linux-i2c@vger.kernel.org \
--cc=xiaobo.xie@nxp.com \
--cc=ying.zhang22455@nxp.com \
--cc=york.sun@nxp.com \
/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).