From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Fabio Estevam <festevam@gmail.com>,
lars@metafoo.de, dmurphy@ti.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@kernel.org
Subject: Re: [PATCH] iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()
Date: Sat, 7 Dec 2024 20:34:30 +0200 [thread overview]
Message-ID: <Z1SVNlBHz12-OP7j@black.fi.intel.com> (raw)
In-Reply-To: <20241201130356.3bf4c693@jic23-huawei>
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@gmail.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
next prev parent reply other threads:[~2024-12-07 18:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 16:43 [PATCH] iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep() Fabio Estevam
2024-12-01 13:03 ` Jonathan Cameron
2024-12-07 18:34 ` Andy Shevchenko [this message]
2024-12-08 18:33 ` Jonathan Cameron
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=Z1SVNlBHz12-OP7j@black.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=dmurphy@ti.com \
--cc=festevam@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
/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