iio: magnetometer: mmc35240: Use a smaller sleep value
authorDaniel Baluta <daniel.baluta@intel.com>
Fri, 5 Jun 2015 11:03:13 +0000 (14:03 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 7 Jun 2015 15:33:20 +0000 (16:33 +0100)
According to datasheet, Page 8, minimum wait time to complete
measurement is 10ms. Adjusting this value will increase the
userspace polling rate.

Fixes: abeb6b1e7b ("iio: magnetometer: Add support for MEMSIC MMC35240")
Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/mmc35240.c

index 146ae66135374ef0ba60745f99a491608a7a4603..7fdf906b94c902e85183bc30b43f71f50bd6736b 100644 (file)
@@ -219,7 +219,8 @@ static int mmc35240_take_measurement(struct mmc35240_data *data)
                        return ret;
                if (reg_status & MMC35240_STATUS_MEAS_DONE_BIT)
                        break;
-               msleep(20);
+               /* minimum wait time to complete measurement is 10 ms */
+               usleep_range(10000, 11000);
        }
 
        if (tries < 0) {
This page took 0.025542 seconds and 5 git commands to generate.