* [PATCH] iio: adc: ti-ads124s08: Switch to fsleep()
@ 2024-12-09 18:02 Fabio Estevam
2024-12-09 18:13 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2024-12-09 18:02 UTC (permalink / raw)
To: jic23; +Cc: linux-iio, andriy.shevchenko, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
According to Documentation/timers/delay_sleep_functions.rst,
fsleep() is the preferred delay function to be used in non-atomic
context, so switch to it accordingly.
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
drivers/iio/adc/ti-ads124s08.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ti-ads124s08.c b/drivers/iio/adc/ti-ads124s08.c
index f452f57f11c9..77c299bb4ebc 100644
--- a/drivers/iio/adc/ti-ads124s08.c
+++ b/drivers/iio/adc/ti-ads124s08.c
@@ -184,7 +184,7 @@ static int ads124s_reset(struct iio_dev *indio_dev)
if (priv->reset_gpio) {
gpiod_set_value_cansleep(priv->reset_gpio, 0);
- udelay(200);
+ fsleep(200);
gpiod_set_value_cansleep(priv->reset_gpio, 1);
} else {
return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: ti-ads124s08: Switch to fsleep()
2024-12-09 18:02 [PATCH] iio: adc: ti-ads124s08: Switch to fsleep() Fabio Estevam
@ 2024-12-09 18:13 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2024-12-09 18:13 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jic23, linux-iio, Fabio Estevam
On Mon, Dec 09, 2024 at 03:02:42PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
>
> According to Documentation/timers/delay_sleep_functions.rst,
> fsleep() is the preferred delay function to be used in non-atomic
> context, so switch to it accordingly.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Can you also change my email in other tags and email headers to be
@linux.intel.com?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-09 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 18:02 [PATCH] iio: adc: ti-ads124s08: Switch to fsleep() Fabio Estevam
2024-12-09 18:13 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox