iio: adc: ad7192: replace usleep_range() with fsleep()

The AD7192 datasheet (Rev. A, page 34, RESET section) says:
"When a reset is initiated, the user must allow a period of
500 us before accessing any of the on-chip registers."

Use fsleep(500) instead of usleep_range(500, 1000).

Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Stepan Ionichev 2026-05-11 07:55:44 +05:00 committed by Jonathan Cameron
parent 01437ab511
commit 7e6a73eda9

View File

@ -576,7 +576,12 @@ static int ad7192_setup(struct iio_dev *indio_dev, struct device *dev)
ret = ad_sd_reset(&st->sd);
if (ret < 0)
return ret;
usleep_range(500, 1000); /* Wait for at least 500us */
/*
* Per AD7192 datasheet (Rev. A, page 34, RESET section), allow
* 500 us after a reset before accessing on-chip registers.
*/
fsleep(500);
/* write/read test for device presence */
ret = ad_sd_read_reg(&st->sd, AD7192_REG_ID, 1, &id);