mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Rickard Andersson <rickard.andersson@axis.com>
Cc: hvilleneuve@dimonoff.com, jic23@kernel.org,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@axis.com
Subject: Re: [PATCH 3/3] iio: adc: ti-ads7924: Use fsleep for reset pulse
Date: Thu, 3 Dec 2026 16:22:51 +0200	[thread overview]
Message-ID: <axF7O1xtbJO0uT5Y@ashevche-desk.local> (raw)
In-Reply-To: <20261203133922.4047959-3-rickard.andersson@axis.com>

On Thu, Dec 03, 2026 at 02:39:22PM +0100, Rickard Andersson wrote:
> 
> The reset pulse in ads7924_reset is generated with mdelay, which
> busy-waits. ads7924_reset is only called from probe,

In all your commit messages please refer to the functions as func().
Exempli gratia, mdelay(), ads7924_reset().

> which runs in process context, so sleeping is allowed.
> 
> Replace mdelay with fsleep to make whole reset function
> being able to sleep.

...

>  	if (data->reset_gpio) {
>  		gpiod_set_value_cansleep(data->reset_gpio, 1); /* Assert. */
>  		/* Educated guess: assert time not specified in datasheet... */
> -		mdelay(100);
> +		fsleep(100 * USEC_PER_MSEC);
>  		gpiod_set_value_cansleep(data->reset_gpio, 0); /* Deassert. */

When such a long delay (usually >= 20ms) in in place we use msleep() directly.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-12-03 14:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 13:39 [PATCH 1/3] iio: adc: ti-ads7924: Allow sleepable GPIO for reset Rickard Andersson
2026-12-03 13:39 ` [PATCH 2/3] iio: adc: ti-ads7924: Wait after hardware reset Rickard Andersson
2026-12-03 14:40   ` Joshua Crofts
2026-12-03 13:39 ` [PATCH 3/3] iio: adc: ti-ads7924: Use fsleep for reset pulse Rickard Andersson
2026-12-03 14:22   ` Andy Shevchenko [this message]
2026-12-03 14:20 ` [PATCH 1/3] iio: adc: ti-ads7924: Allow sleepable GPIO for reset Andy Shevchenko

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=axF7O1xtbJO0uT5Y@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=jic23@kernel.org \
    --cc=kernel@axis.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=rickard.andersson@axis.com \
    /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

all inboxes | Powered by JetHome®