提交 787f55c4 编写于 作者: D Daniel Baluta 提交者: Jonathan Cameron

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: abeb6b1e ("iio: magnetometer: Add support for MEMSIC MMC35240")
Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 c2890547
...@@ -219,7 +219,8 @@ static int mmc35240_take_measurement(struct mmc35240_data *data) ...@@ -219,7 +219,8 @@ static int mmc35240_take_measurement(struct mmc35240_data *data)
return ret; return ret;
if (reg_status & MMC35240_STATUS_MEAS_DONE_BIT) if (reg_status & MMC35240_STATUS_MEAS_DONE_BIT)
break; break;
msleep(20); /* minimum wait time to complete measurement is 10 ms */
usleep_range(10000, 11000);
} }
if (tries < 0) { if (tries < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册