From: jacopo mondi <jacopo@jmondi.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [RFT] i2c: sh_mobile: avoid unnecessary register read
Date: Tue, 14 Nov 2017 10:10:47 +0100 [thread overview]
Message-ID: <20171114091047.GG19070@w540> (raw)
In-Reply-To: <20171109222053.27093-1-wsa+renesas@sang-engineering.com>
Hi Wolfram,
On Thu, Nov 09, 2017 at 11:20:53PM +0100, Wolfram Sang wrote:
> There is no data when the first WAIT interrupt arrives. No need to read
> something then.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> I am not super happy with (real pos >= 0) done twice, but I didn't find a
> better solution yet. The compiler will make this cheap anyhow, I guess.
>
> Jacopo: can you please test this on top of all other patches?
No regressions on Migo-R during image capture.
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Thanks
j
>
> drivers/i2c/busses/i2c-sh_mobile.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
> index 80561ffbcf7b46..40a66d466c3c49 100644
> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> @@ -433,8 +433,9 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
> break;
> }
> data = i2c_op(pd, OP_RX_STOP_DATA, 0);
> - } else
> + } else if (real_pos >= 0) {
> data = i2c_op(pd, OP_RX, 0);
> + }
>
> if (real_pos >= 0)
> pd->msg->buf[real_pos] = data;
> --
> 2.11.0
>
next prev parent reply other threads:[~2017-11-14 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 22:20 [RFT] i2c: sh_mobile: avoid unnecessary register read Wolfram Sang
2017-11-14 9:10 ` jacopo mondi [this message]
2017-11-27 17:56 ` 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=20171114091047.GG19070@w540 \
--to=jacopo@jmondi.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.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 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.