From: Oleksij Rempel Date: Tue, 10 Feb 2026 13:51:04 +0000 (+0100) Subject: iio: dac: ds4424: use fsleep() instead of usleep_range() X-Git-Tag: v7.1-rc1~17^2~120^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ff37a60b39804c6e505fc2069a3d892b5d787f5;p=thirdparty%2Fkernel%2Fstable.git iio: dac: ds4424: use fsleep() instead of usleep_range() The DS4422/DS4424 and DS4402/DS4404 datasheets do not specify a minimum delay between power-up (POR) and the availability of the I2C interface. The driver previously used `usleep_range(1000, 1200)` to enforce a ~1ms delay. Replace this with `fsleep(1000)` to allow the kernel to select the most efficient sleep mechanism while retaining the existing conservative delay to ensure device readiness. Signed-off-by: Oleksij Rempel Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/dac/ds4424.c b/drivers/iio/dac/ds4424.c index 3e72a40d053cc..f9cdc695032d7 100644 --- a/drivers/iio/dac/ds4424.c +++ b/drivers/iio/dac/ds4424.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -244,7 +245,13 @@ static int ds4424_probe(struct i2c_client *client) return ret; } - usleep_range(1000, 1200); + /* + * The datasheet does not specify a power-up to I2C ready time. + * Maintain the existing conservative 1ms delay to ensure the + * device is ready for communication. + */ + fsleep(1 * USEC_PER_MSEC); + ret = ds4424_verify_chip(indio_dev); if (ret < 0) goto fail;