From: Federico Vaga <federico.vaga@cern.ch>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Peter Korsgaard <peter@korsgaard.com>,
Andrew Lunn <andrew@lunn.ch>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/5] i2c:ocores: add polling interface
Date: Mon, 11 Feb 2019 14:47:47 +0100 [thread overview]
Message-ID: <2252068.1XvXk90vR3@pcbe13614> (raw)
In-Reply-To: <20190211102526.3y46r43usznu4jgp@ninjato>
On Monday, February 11, 2019 11:25:26 AM CET Wolfram Sang wrote:
> On Mon, Feb 11, 2019 at 09:31:20AM +0100, Federico Vaga wrote:
> > This driver assumes that an interrupt line is always available for
> > the I2C master. This is not always the case and this patch adds support
> > for a polling version.
> >
> > Report from Andrew Lunn:
> > I did some timing tests for this. On my box, we request a udelay of
> > 80uS. The kernel actually delays for about 79uS. We then spin in
> > ocores_wait() for an additional 10-11uS, which is 3 to 4 iterations.
> >
> > There are actually 9 bits on the wire, not 8, since there is an
> > ACK/NACK bit after the actual data transfer. So i changed the delay to
> > (9 * 1000) / i2c->bus_clock_khz. That resulted in ocores_wait() mostly
> > not looping at all. But for reading an 4K AT24 EEPROM, it increased
> > the read time by 10ms, from 424ms to 434ms. So we should probably keep
> > with 8.
> >
> > Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> > Tested-by: Andrew Lunn <andrew@lunn.ch>
>
> Fixed these checkpatch warnings:
>
> WARNING: 'transfered' may be misspelled - perhaps 'transferred'?
> #111: FILE: drivers/i2c/busses/i2c-ocores.c:306:
> + * We wait for the data to be transfered (8bit),
>
> CHECK: Please don't use multiple blank lines
> #129: FILE: drivers/i2c/busses/i2c-ocores.c:324:
> +
> +
>
> WARNING: 'transfered' may be misspelled - perhaps 'transferred'?
> #154: FILE: drivers/i2c/busses/i2c-ocores.c:349:
> + break; /* all messages have been transfered */
>
> and applied to for-next, thanks!
I will resend this patch as v5 to add the fix suggested by Peter Rosin
WARNING: multiple messages have this Message-ID (diff)
From: Federico Vaga <federico.vaga@cern.ch>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Peter Korsgaard <peter@korsgaard.com>,
Andrew Lunn <andrew@lunn.ch>, <linux-i2c@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 3/5] i2c:ocores: add polling interface
Date: Mon, 11 Feb 2019 14:47:47 +0100 [thread overview]
Message-ID: <2252068.1XvXk90vR3@pcbe13614> (raw)
In-Reply-To: <20190211102526.3y46r43usznu4jgp@ninjato>
On Monday, February 11, 2019 11:25:26 AM CET Wolfram Sang wrote:
> On Mon, Feb 11, 2019 at 09:31:20AM +0100, Federico Vaga wrote:
> > This driver assumes that an interrupt line is always available for
> > the I2C master. This is not always the case and this patch adds support
> > for a polling version.
> >
> > Report from Andrew Lunn:
> > I did some timing tests for this. On my box, we request a udelay of
> > 80uS. The kernel actually delays for about 79uS. We then spin in
> > ocores_wait() for an additional 10-11uS, which is 3 to 4 iterations.
> >
> > There are actually 9 bits on the wire, not 8, since there is an
> > ACK/NACK bit after the actual data transfer. So i changed the delay to
> > (9 * 1000) / i2c->bus_clock_khz. That resulted in ocores_wait() mostly
> > not looping at all. But for reading an 4K AT24 EEPROM, it increased
> > the read time by 10ms, from 424ms to 434ms. So we should probably keep
> > with 8.
> >
> > Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> > Tested-by: Andrew Lunn <andrew@lunn.ch>
>
> Fixed these checkpatch warnings:
>
> WARNING: 'transfered' may be misspelled - perhaps 'transferred'?
> #111: FILE: drivers/i2c/busses/i2c-ocores.c:306:
> + * We wait for the data to be transfered (8bit),
>
> CHECK: Please don't use multiple blank lines
> #129: FILE: drivers/i2c/busses/i2c-ocores.c:324:
> +
> +
>
> WARNING: 'transfered' may be misspelled - perhaps 'transferred'?
> #154: FILE: drivers/i2c/busses/i2c-ocores.c:349:
> + break; /* all messages have been transfered */
>
> and applied to for-next, thanks!
I will resend this patch as v5 to add the fix suggested by Peter Rosin
next prev parent reply other threads:[~2019-02-11 13:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-11 8:31 [PATCH v4 0/5] i2c:ocores: improvements Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 8:31 ` [PATCH v4 1/5] i2c:ocores: stop transfer on timeout Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 10:24 ` Wolfram Sang
2019-02-11 14:01 ` Andrew Lunn
2019-02-11 14:34 ` Federico Vaga
2019-02-11 14:34 ` Federico Vaga
2019-02-11 14:53 ` Wolfram Sang
2019-02-11 10:44 ` Peter Rosin
2019-02-11 13:02 ` Federico Vaga
2019-02-11 8:31 ` [PATCH v4 2/5] i2c:ocores: do not handle IRQ if IF is not set Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 10:24 ` Wolfram Sang
2019-02-11 8:31 ` [PATCH v4 3/5] i2c:ocores: add polling interface Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 10:25 ` Wolfram Sang
2019-02-11 13:47 ` Federico Vaga [this message]
2019-02-11 13:47 ` Federico Vaga
2019-02-11 10:43 ` Peter Rosin
2019-02-11 13:14 ` Federico Vaga
2019-02-11 13:35 ` Peter Rosin
2019-02-11 13:46 ` Federico Vaga
2019-02-11 8:31 ` [PATCH v4 4/5] i2c:ocores: add SPDX tag Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 10:25 ` Wolfram Sang
2019-02-11 8:31 ` [PATCH v4 5/5] i2c:ocores: checkpatch fixes Federico Vaga
2019-02-11 8:31 ` Federico Vaga
2019-02-11 10:16 ` Peter Rosin
2019-02-11 10:26 ` Wolfram Sang
2019-02-11 10:28 ` Peter Rosin
2019-02-11 10:52 ` Peter Rosin
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=2252068.1XvXk90vR3@pcbe13614 \
--to=federico.vaga@cern.ch \
--cc=andrew@lunn.ch \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@korsgaard.com \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.