[PATCH v2 1/4] i2c: imx: only poll for bus busy in multi master mode
Fabio Estevam
festevam at gmail.com
Thu Aug 22 04:07:44 PDT 2024
Hi Stefan and Oleksij,
On Wed, Aug 21, 2024 at 8:01 AM Fabio Estevam <festevam at gmail.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 at denx.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?
More information about the linux-arm-kernel
mailing list