[EXT] Re: [PATCH 4/5] i2c: imx-lpi2c: improve i2c driver probe priority
Carlos Song
carlos.song at nxp.com
Fri Aug 30 01:53:01 PDT 2024
> -----Original Message-----
> From: Stefan Wahren <wahrenst at gmx.net>
> Sent: Thursday, August 29, 2024 6:16 PM
> To: Carlos Song <carlos.song at nxp.com>; Aisheng Dong
> <aisheng.dong at nxp.com>; andi.shyti at kernel.org; shawnguo at kernel.org;
> s.hauer at pengutronix.de; kernel at pengutronix.de; festevam at gmail.com
> Cc: linux-i2c at vger.kernel.org; imx at lists.linux.dev;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: [EXT] Re: [PATCH 4/5] i2c: imx-lpi2c: improve i2c driver probe priority
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> Hi Carlos,
>
> Am 29.08.24 um 11:37 schrieb carlos.song at nxp.com:
> > From: Carlos Song <carlos.song at nxp.com>
> >
> > Some i2c devices such as PMICs need i2c bus available early.
> > Use subsys_initcall to improve i2c driver probe priority.
> thanks for providing this patch.
>
> Please try to be more specific, which devices/platform has been effected by this
> issue. It would be nice to provide to kind of link/reference/discussion.
>
Hi, Thanks you!
Some I2C peripherals, like PMICs for voltage and power supply adjustment, need to be probed early
in the boot process to configure the system. Additionally, some boards have switches ,where some device need to be
chosen by a GPIO expander manipulating the corresponding GPIO pad. So GPIO expander also needs to be probed early
before these switched devices' driver probing. To guarantee their correct function, this patch was introduced.
This patch has been in our local repository for a long time, so I don't find any detailed documentation about its purpose or the platforms it affects.
Sorry about it. Since I2C is an important basic bus, many devices rely on it, so probed early seems reasonable, then I send it out.
> Best regards
> >
> > Signed-off-by: Carlos Song <carlos.song at nxp.com>
> > Signed-off-by: Frank Li <Frank.Li at nxp.com>
> > ---
> > drivers/i2c/busses/i2c-imx-lpi2c.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c
> > b/drivers/i2c/busses/i2c-imx-lpi2c.c
> > index 0159ade235ef..210d505db76d 100644
> > --- a/drivers/i2c/busses/i2c-imx-lpi2c.c
> > +++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
> > @@ -1487,7 +1487,17 @@ static struct platform_driver lpi2c_imx_driver = {
> > },
> > };
> >
> > -module_platform_driver(lpi2c_imx_driver);
> > +static int __init lpi2c_imx_init(void) {
> > + return platform_driver_register(&lpi2c_imx_driver);
> > +}
> > +subsys_initcall(lpi2c_imx_init);
> > +
> > +static void __exit lpi2c_imx_exit(void) {
> > + platform_driver_unregister(&lpi2c_imx_driver);
> > +}
> > +module_exit(lpi2c_imx_exit);
> >
> > MODULE_AUTHOR("Gao Pan <pandy.gao at nxp.com>");
> > MODULE_DESCRIPTION("I2C adapter driver for LPI2C bus");
More information about the linux-arm-kernel
mailing list