summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>2020-02-19 17:39:56 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-03-08 20:28:39 +0300
commit5e95ca3637d6f706d157a5f12e51f3e1c175285a (patch)
tree6710964b87b4eea853800ec0994b619b4f9bbb9e /drivers
parent4c1e0147015c19566b5c6a4b4f656a57ce897ea8 (diff)
downloadlinux-5e95ca3637d6f706d157a5f12e51f3e1c175285a.tar.xz
iio: imu: inv_mpu6050: dynamic sampling rate change
Sampling rate can be changed while the chip is running. It can be useful thus do not prevent it. Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_core.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
index aeee39696d3a..9076b6bb099c 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -910,10 +910,6 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
fifo_rate > INV_MPU6050_MAX_FIFO_RATE)
return -EINVAL;
- result = iio_device_claim_direct_mode(indio_dev);
- if (result)
- return result;
-
/* compute the chip sample rate divider */
d = INV_MPU6050_FIFO_RATE_TO_DIVIDER(fifo_rate);
/* compute back the fifo rate to handle truncation cases */
@@ -946,7 +942,6 @@ fifo_rate_fail_power_off:
result |= inv_mpu6050_set_power_itg(st, false);
fifo_rate_fail_unlock:
mutex_unlock(&st->lock);
- iio_device_release_direct_mode(indio_dev);
if (result)
return result;