From: Stefan Eichenberger <eichest@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: o.rempel@pengutronix.de, kernel@pengutronix.de,
andi.shyti@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, Frank.Li@nxp.com,
francesco.dolcini@toradex.com, linux-i2c@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Stefan Eichenberger <stefan.eichenberger@toradex.com>
Subject: Re: [PATCH v2 1/4] i2c: imx: only poll for bus busy in multi master mode
Date: Fri, 23 Aug 2024 15:43:41 +0200 [thread overview]
Message-ID: <ZsiSDUYmxPKnNdHD@eichest-laptop> (raw)
In-Reply-To: <CAOMZO5CeT+LvQ__3GUf6teL3=8pZe5qxmFffYJX-h3E27UXwtQ@mail.gmail.com>
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@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@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?
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
next prev parent reply other threads:[~2024-08-23 13:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 7:19 [PATCH v2 0/4] i2c: imx: prevent rescheduling in non-dma mode Stefan Eichenberger
2024-08-19 7:19 ` [PATCH v2 1/4] i2c: imx: only poll for bus busy in multi master mode Stefan Eichenberger
2024-08-21 11:01 ` Fabio Estevam
2024-08-21 14:39 ` Oleksij Rempel
2024-08-21 15:23 ` Stefan Eichenberger
2024-08-21 16:43 ` Fabio Estevam
2024-08-21 22:31 ` Andi Shyti
2024-08-22 6:51 ` Oleksij Rempel
2024-08-22 11:07 ` Fabio Estevam
2024-08-22 11:50 ` Stefan Eichenberger
2024-08-22 12:59 ` Fabio Estevam
2024-08-23 13:43 ` Stefan Eichenberger [this message]
2024-08-21 22:21 ` Andi Shyti
2024-08-22 7:03 ` Stefan Eichenberger
2024-08-22 10:04 ` Oleksij Rempel
2024-08-22 12:03 ` Stefan Eichenberger
2024-08-23 0:35 ` Andi Shyti
2024-08-23 13:48 ` Stefan Eichenberger
2024-08-23 14:04 ` Oleksij Rempel
2024-08-23 14:42 ` Stefan Eichenberger
2024-08-19 7:19 ` [PATCH v2 2/4] i2c: imx: separate atomic, dma and non-dma use case Stefan Eichenberger
2024-08-30 7:31 ` Oleksij Rempel
2024-08-19 7:19 ` [PATCH v2 3/4] i2c: imx: use readb_relaxed and writeb_relaxed Stefan Eichenberger
2024-08-30 7:37 ` Oleksij Rempel
2024-08-19 7:19 ` [PATCH v2 4/4] i2c: imx: prevent rescheduling in non dma mode Stefan Eichenberger
2024-08-30 8:13 ` Oleksij Rempel
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=ZsiSDUYmxPKnNdHD@eichest-laptop \
--to=eichest@gmail.com \
--cc=Frank.Li@nxp.com \
--cc=andi.shyti@kernel.org \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefan.eichenberger@toradex.com \
/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).