diff options
author | Daniel Baluta <daniel.baluta@intel.com> | 2015-06-05 14:03:13 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-07 16:33:20 +0100 |
commit | 787f55c4d1842e5fb037a81bca9bd9d9fdfd46fe (patch) | |
tree | a6428900a2ca5898a257b2880a0755601f95d643 /drivers/iio | |
parent | c2890547a035e019df646be5d56adc0ee1b0a327 (diff) | |
download | blackbird-obmc-linux-787f55c4d1842e5fb037a81bca9bd9d9fdfd46fe.tar.gz blackbird-obmc-linux-787f55c4d1842e5fb037a81bca9bd9d9fdfd46fe.zip |
iio: magnetometer: mmc35240: Use a smaller sleep value
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/magnetometer/mmc35240.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/mmc35240.c b/drivers/iio/magnetometer/mmc35240.c index 146ae6613537..7fdf906b94c9 100644 --- a/drivers/iio/magnetometer/mmc35240.c +++ b/drivers/iio/magnetometer/mmc35240.c @@ -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) { |