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: <Z1SVNlBHz12-OP7j@black.fi.intel.com>
Date: Sat, 7 Dec 2024 20:34:30 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Fabio Estevam <festevam@...il.com>, lars@...afoo.de, dmurphy@...com,
	linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...nel.org
Subject: Re: [PATCH] iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()

On Sun, Dec 01, 2024 at 01:03:56PM +0000, Jonathan Cameron wrote:
> On Fri, 22 Nov 2024 13:43:08 -0300
> Fabio Estevam <festevam@...il.com> wrote:
> > Using gpiod_set_value() to control the reset GPIO causes some verbose
> > warnings during boot when the reset GPIO is controlled by an I2C IO
> > expander.
> > 
> > As the caller can sleep, use the gpiod_set_value_cansleep() variant to
> > fix the issue.
> > 
> > Tested on a custom i.MX93 board with a ADS124S08 ADC.

> Hmm. Could be considered a feature, but fair enough as the change is
> trivial and you are setting it on a real board.
> 
> Applied to the fixes-togreg branch of iio.git.

...

> > @@ -183,9 +183,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)
> >  	struct ads124s_private *priv = iio_priv(indio_dev);
> >  
> >  	if (priv->reset_gpio) {
> > -		gpiod_set_value(priv->reset_gpio, 0);
> > +		gpiod_set_value_cansleep(priv->reset_gpio, 0);
> >  		udelay(200);

Obviously if you allow that change, you should switch to fsleep() here.

> > -		gpiod_set_value(priv->reset_gpio, 1);
> > +		gpiod_set_value_cansleep(priv->reset_gpio, 1);
> >  	} else {
> >  		return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
> >  	}

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ