Skip to contentSkip to conversation

iio: magnetometer: ak8975: replace usleep_range() with fsleep()

PATCH In review Stepan Ionichev 2 participants 3 messages May 10 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: magnetometer: ak8975: replace usleep_range() with fsleep()

The "minimum 500us here" wait after power-up has no specific upper bound. fsleep(500) expands to the same usleep_range(500, 1000) internally.

No functional change.

---
 drivers/iio/magnetometer/ak8975.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/magnetometer/ak8975.c +1 -1
index b648b0afa..a88b19fc1 100644
@@ -456,7 +456,7 @@ static int ak8975_power_on(const struct ak8975_data *data)
 	 * and the minimum wait time before mode setting is 100us, in
 	 * total 300us. Add some margin and say minimum 500us here.
 	 */
-	usleep_range(500, 1000);
+	fsleep(500);
 	return 0;
 }
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 26 lines · Stepan Ionichev

The "minimum 500us here" wait after power-up has no specific upper bound. fsleep(500) expands to the same usleep_range(500, 1000) internally.

No functional change.

---
 drivers/iio/magnetometer/ak8975.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/magnetometer/ak8975.c +1 -2
index b648b0afa..a88b19fc1 100644
@@ -456,7 +456,7 @@ static int ak8975_power_on(const struct ak8975_data *data)
         * and the minimum wait time before mode setting is 100us, in
         * total 300us. Add some margin and say minimum 500us here.
         */
-       usleep_range(500, 1000);
+       fsleep(500);
        return 0;
 }
 
--
Quoted 3 lines

2.43.0

I've beaten you to it unfortunately...
https://lore.kernel.org/all/20260506173946.2b1907d7@jic23-huawei/

Signature · 3 lines
Kind regards

CJD