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: <ZOSk0b1wKF/NzCzz@smile.fi.intel.com>
Date:   Tue, 22 Aug 2023 15:06:41 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Yann Sionneau <ysionneau@...ray.eu>
Cc:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Julian Vetter <jvetter@...rayinc.com>,
        linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] Currently if the SoC needs pinctrl to switch the SCL
 and SDA from the I2C function to GPIO function, the recovery won't work.

On Tue, Aug 22, 2023 at 03:02:48PM +0300, Andy Shevchenko wrote:
> On Tue, Aug 22, 2023 at 11:15:55AM +0200, Yann Sionneau wrote:

...

> > +	rinfo->pinctrl = devm_pinctrl_get(dev->dev);
> > +	if (IS_ERR(rinfo->pinctrl)) {
> > +		if (PTR_ERR(rinfo->pinctrl) == -EPROBE_DEFER)
> > +			return PTR_ERR(rinfo->pinctrl);
> > +
> > +		rinfo->pinctrl = NULL;
> > +		dev_err(dev->dev, "getting pinctrl info failed: bus recovery might not work\n");
> > +	} else if (!rinfo->pinctrl) {
> > +		dev_dbg(dev->dev, "pinctrl is disabled, bus recovery might not work\n");
> > +	}
> 
> A bit of bikeshedding, would the below be slightly better?
> 
> 	rinfo->pinctrl = devm_pinctrl_get(dev->dev);
> 	if (IS_ERR(rinfo->pinctrl)) {
> 		if (PTR_ERR(rinfo->pinctrl) == -EPROBE_DEFER)
> 			return PTR_ERR(rinfo->pinctrl);
> 
> 		rinfo->pinctrl = NULL;
> 		dev_err(dev->dev, "getting pinctrl info failed, disabling...\n");
> 	}
> 	if (!rinfo->pinctrl)
> 		dev_dbg(dev->dev, "pinctrl is disabled, bus recovery might not work\n");

On the second thought they are on a different levels... Anyway, up to you,
folks, what to do with that, I gave already my tag.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ