[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGFuAux2BRy8SS=OqU=e4vryTnNLm0oKD6OCbEecy4ZoPO1yqA@mail.gmail.com>
Date: Sun, 2 Jun 2024 15:07:11 +0200
From: grygorii tertychnyi <grembeter@...il.com>
To: Peter Korsgaard <peter@...sgaard.com>, Andrew Lunn <andrew@...n.ch>,
Thomas Gleixner <tglx@...utronix.de>, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Grygorii Tertychnyi <grygorii.tertychnyi@...ca-geosystems.com>,
bsp-development.geo@...ca-geosystems.com, stable@...r.kernel.org
Subject: Re: [PATCH v2] i2c: ocores: set IACK bit after core is enabled
Hi,
just a gentle ping... Is there anything missing?
regards
On Mon, May 20, 2024 at 5:40 PM Grygorii Tertychnyi <grembeter@...il.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@...ca-geosystems.com>
> Acked-by: Peter Korsgaard <peter@...sgaard.com>
> Cc: stable@...r.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
>
Powered by blists - more mailing lists