[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZsiSDUYmxPKnNdHD@eichest-laptop>
Date: Fri, 23 Aug 2024 15:43:41 +0200
From: Stefan Eichenberger <eichest@...il.com>
To: Fabio Estevam <festevam@...il.com>
Cc: o.rempel@...gutronix.de, kernel@...gutronix.de, andi.shyti@...nel.org,
shawnguo@...nel.org, s.hauer@...gutronix.de, Frank.Li@....com,
francesco.dolcini@...adex.com, linux-i2c@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Stefan Eichenberger <stefan.eichenberger@...adex.com>
Subject: Re: [PATCH v2 1/4] i2c: imx: only poll for bus busy in multi master
mode
Hi Fabio,
On Thu, Aug 22, 2024 at 08:07:44AM -0300, Fabio Estevam wrote:
> Hi Stefan and Oleksij,
>
> On Wed, Aug 21, 2024 at 8:01 AM Fabio Estevam <festevam@...il.com> wrote:
>
> > This fixes a pca953x probe error on an imx8mp board running linux-stable 6.6:
> >
> > [ 1.893260] pca953x 2-0020: failed writing register
> > [ 1.898258] pca953x 2-0020: probe with driver pca953x failed with error -11
> >
> > Could you please add a Fixes tag and Cc stable so that this can reach
> > the stable kernels?
> >
> > Tested-by: Fabio Estevam <festevam@...x.de>
>
> I am sorry, but I have to withdraw my Tested-by tag.
>
> For debugging purposes, I kept 'fw_devlink=off' in the kernel command
> line and that's what made it work.
>
> Removing 'fw_devlink=off' I still get the probe failure, even with all
> the series from Stefan applied:
>
> [ 1.849097] pca953x 2-0020: supply vcc not found, using dummy regulator
> [ 1.855857] pca953x 2-0020: using no AI
> [ 1.859965] i2c i2c-2: <i2c_imx_write> write failed with -6
> [ 1.865578] pca953x 2-0020: failed writing register: -6
>
> In my case, I can get the pca953x driver to probe successfully in one
> of the following cases:
>
> 1. Select pca953x as a module instead of built-in
>
> or
>
> 2. Pass 'fw_devlink=off' in the kernel command line
>
> or
>
> 3. Register the i2c-imx driver as module_platform_driver():
>
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -1586,17 +1586,7 @@ static struct platform_driver i2c_imx_driver = {
> .id_table = imx_i2c_devtype,
> };
>
> -static int __init i2c_adap_imx_init(void)
> -{
> - return platform_driver_register(&i2c_imx_driver);
> -}
> -subsys_initcall(i2c_adap_imx_init);
> -
> -static void __exit i2c_adap_imx_exit(void)
> -{
> - platform_driver_unregister(&i2c_imx_driver);
> -}
> -module_exit(i2c_adap_imx_exit);
> +module_platform_driver(i2c_imx_driver);
>
> or
>
> 4. Use the NXP vendor kernel imx_6.1.22_2.0.0 kernel
>
> Stefan, do you get the arbitration errors if you try methods 2 or 3 above?
I have tried method 3 an it did not work for me. I still have the same
issue as before that sometimes the timeout occurs and the ads1015 will
not ack anymore. So the patch series is still the only way I found so
far to get rid of the problem. I also checked the datasheet of a pca953x
device (PCAL6416A) and it doesn't seem to have a timeout mechanism.
Therefore, I don't think we are affected by the same issue.
Regards,
Stefan
Powered by blists - more mailing lists