Message ID | 20200219143958.3548-12-jmaneyrol@invensense.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Rework sensors engines and power management | expand |
On Wed, 19 Feb 2020 15:39:56 +0100 Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> wrote: > 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> Applied. Thanks, Jonathan > --- > drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 5 ----- > 1 file changed, 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 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr, > 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; >
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 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr, 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;
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> --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 5 ----- 1 file changed, 5 deletions(-)