From: Simon Horman <horms@verge.net.au>
To: Chris Brandt <chris.brandt@renesas.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] i2c: riic: fix restart condition
Date: Tue, 7 Mar 2017 07:42:58 +0100 [thread overview]
Message-ID: <20170307064257.GC14208@verge.net.au> (raw)
In-Reply-To: <20170306202051.3158-1-chris.brandt@renesas.com>
On Mon, Mar 06, 2017 at 03:20:51PM -0500, Chris Brandt wrote:
> While modifying the driver to use the STOP interrupt, the completion of the
> intermediate transfers need to wake the driver back up in order to initiate
> the next transfer (restart condition). Otherwise you get never ending
> interrupts and only the first transfer sent.
>
> Fixes: 71ccea095ea1 ("i2c: riic: correctly finish transfers")
> Reported-by: Simon Horman <horms@verge.net.au>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Thanks Chris,
with this patch applied on top of v4.11-rc1 Genmai once again boots
to userspace with shmobile_defconfig.
Tested-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> drivers/i2c/busses/i2c-riic.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-riic.c b/drivers/i2c/busses/i2c-riic.c
> index 8f11d34..c811af4 100644
> --- a/drivers/i2c/busses/i2c-riic.c
> +++ b/drivers/i2c/busses/i2c-riic.c
> @@ -218,8 +218,12 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
> }
>
> if (riic->is_last || riic->err) {
> - riic_clear_set_bit(riic, 0, ICIER_SPIE, RIIC_ICIER);
> + riic_clear_set_bit(riic, ICIER_TEIE, ICIER_SPIE, RIIC_ICIER);
> writeb(ICCR2_SP, riic->base + RIIC_ICCR2);
> + } else {
> + /* Transfer is complete, but do not send STOP */
> + riic_clear_set_bit(riic, ICIER_TEIE, 0, RIIC_ICIER);
> + complete(&riic->msg_done);
> }
>
> return IRQ_HANDLED;
> --
> 2.10.1
>
>
next prev parent reply other threads:[~2017-03-07 6:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 20:20 [PATCH] i2c: riic: fix restart condition Chris Brandt
2017-03-07 6:42 ` Simon Horman [this message]
2017-03-09 14:40 ` 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=20170307064257.GC14208@verge.net.au \
--to=horms@verge.net.au \
--cc=chris.brandt@renesas.com \
--cc=geert@linux-m68k.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--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 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).