lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DB7PR04MB5003297FAC3474F41638C50AE8972@DB7PR04MB5003.eurprd04.prod.outlook.com>
Date: Fri, 30 Aug 2024 08:53:01 +0000
From: Carlos Song <carlos.song@....com>
To: Stefan Wahren <wahrenst@....net>, Aisheng Dong <aisheng.dong@....com>,
	"andi.shyti@...nel.org" <andi.shyti@...nel.org>, "shawnguo@...nel.org"
	<shawnguo@...nel.org>, "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
	"kernel@...gutronix.de" <kernel@...gutronix.de>, "festevam@...il.com"
	<festevam@...il.com>
CC: "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH 4/5] i2c: imx-lpi2c: improve i2c driver probe
 priority



> -----Original Message-----
> From: Stefan Wahren <wahrenst@....net>
> Sent: Thursday, August 29, 2024 6:16 PM
> To: Carlos Song <carlos.song@....com>; Aisheng Dong
> <aisheng.dong@....com>; andi.shyti@...nel.org; shawnguo@...nel.org;
> s.hauer@...gutronix.de; kernel@...gutronix.de; festevam@...il.com
> Cc: linux-i2c@...r.kernel.org; imx@...ts.linux.dev;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.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@....com:
> > From: Carlos Song <carlos.song@....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@....com>
> > Signed-off-by: Frank Li <Frank.Li@....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@....com>");
> >   MODULE_DESCRIPTION("I2C adapter driver for LPI2C bus");


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ