From: grygorii tertychnyi <grembeter@gmail.com>
To: Peter Korsgaard <peter@korsgaard.com>,
Andrew Lunn <andrew@lunn.ch>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Andi Shyti <andi.shyti@kernel.org>
Cc: Grygorii Tertychnyi <grygorii.tertychnyi@leica-geosystems.com>,
bsp-development.geo@leica-geosystems.com,
stable@vger.kernel.org
Subject: Re: [PATCH v2] i2c: ocores: set IACK bit after core is enabled
Date: Mon, 17 Jun 2024 19:22:44 +0200 [thread overview]
Message-ID: <CAGFuAux+x17M4XK6jCHknYecvq97GxKTHz6ZLh8iTmL6Wmz-Jw@mail.gmail.com> (raw)
In-Reply-To: <20240520153932.116731-1-grygorii.tertychnyi@leica-geosystems.com>
Hi,
just another gentle ping... Not sure if I need to rebase it on the
latest master?
regards
On Mon, May 20, 2024 at 5:40 PM Grygorii Tertychnyi <grembeter@gmail.com> wrote:
>
> Setting IACK bit when core is disabled does not clear the "Interrupt Flag"
> bit in the status register, and the interrupt remains pending.
>
> Sometimes it causes failure for the very first message transfer, that is
> usually a device probe.
>
> Hence, set IACK bit after core is enabled to clear pending interrupt.
>
> Fixes: 18f98b1e3147 ("[PATCH] i2c: New bus driver for the OpenCores I2C controller")
> Signed-off-by: Grygorii Tertychnyi <grygorii.tertychnyi@leica-geosystems.com>
> Acked-by: Peter Korsgaard <peter@korsgaard.com>
> Cc: stable@vger.kernel.org
> ---
> V1 -> V2: Added "Acked-by:", "Fixes:" and "Cc:" tags
>
> drivers/i2c/busses/i2c-ocores.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
> index e106af83cef4..350ccfbe8634 100644
> --- a/drivers/i2c/busses/i2c-ocores.c
> +++ b/drivers/i2c/busses/i2c-ocores.c
> @@ -442,8 +442,8 @@ static int ocores_init(struct device *dev, struct ocores_i2c *i2c)
> oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8);
>
> /* Init the device */
> - oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
> oc_setreg(i2c, OCI2C_CONTROL, ctrl | OCI2C_CTRL_EN);
> + oc_setreg(i2c, OCI2C_CMD, OCI2C_CMD_IACK);
>
> return 0;
> }
> --
> 2.43.0
>
next prev parent reply other threads:[~2024-06-17 17:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 15:39 [PATCH v2] i2c: ocores: set IACK bit after core is enabled Grygorii Tertychnyi
2024-05-20 17:00 ` Markus Elfring
2024-05-20 18:20 ` Greg KH
2024-06-02 13:07 ` grygorii tertychnyi
2024-06-17 17:22 ` grygorii tertychnyi [this message]
2024-06-20 23:19 ` Andi Shyti
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=CAGFuAux+x17M4XK6jCHknYecvq97GxKTHz6ZLh8iTmL6Wmz-Jw@mail.gmail.com \
--to=grembeter@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=andrew@lunn.ch \
--cc=bsp-development.geo@leica-geosystems.com \
--cc=grygorii.tertychnyi@leica-geosystems.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@korsgaard.com \
--cc=stable@vger.kernel.org \
/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).