Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391906
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/7] iio: inv_mpu6050: Only toggle DATA_RDY_EN in inv_reset_fifo |
| Date | 2016-05-01 23:30 +0200 |
| Message-ID | <ru76c-86o-53@gated-at.bofh.it> (permalink) |
| References | <rtlXz-2Jp-1@gated-at.bofh.it> <rtlXA-2Jp-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 29/04/16 20:02, Crestez Dan Leonard wrote:
> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Looks fine to me...
> ---
> drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 13 +++++++-----
> drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c | 3 ++-
> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> index 8455af0..3fc0b71 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> @@ -41,7 +41,8 @@ int inv_reset_fifo(struct iio_dev *indio_dev)
> struct inv_mpu6050_state *st = iio_priv(indio_dev);
>
> /* disable interrupt */
> - result = regmap_write(st->map, st->reg->int_enable, 0);
> + result = regmap_update_bits(st->map, st->reg->int_enable,
> + INV_MPU6050_BIT_DATA_RDY_EN, 0);
> if (result) {
> dev_err(regmap_get_device(st->map), "int_enable failed %d\n",
> result);
> @@ -68,8 +69,9 @@ int inv_reset_fifo(struct iio_dev *indio_dev)
> /* enable interrupt */
> if (st->chip_config.accl_fifo_enable ||
> st->chip_config.gyro_fifo_enable) {
> - result = regmap_write(st->map, st->reg->int_enable,
> - INV_MPU6050_BIT_DATA_RDY_EN);
> + result = regmap_update_bits(st->map, st->reg->int_enable,
> + INV_MPU6050_BIT_DATA_RDY_EN,
> + INV_MPU6050_BIT_DATA_RDY_EN);
> if (result)
> return result;
> }
> @@ -92,8 +94,9 @@ int inv_reset_fifo(struct iio_dev *indio_dev)
>
> reset_fifo_fail:
> dev_err(regmap_get_device(st->map), "reset fifo failed %d\n", result);
> - result = regmap_write(st->map, st->reg->int_enable,
> - INV_MPU6050_BIT_DATA_RDY_EN);
> + result = regmap_update_bits(st->map, st->reg->int_enable,
> + INV_MPU6050_BIT_DATA_RDY_EN,
> + INV_MPU6050_BIT_DATA_RDY_EN);
>
> return result;
> }
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> index e8818d4..1a6bad3 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
> @@ -69,7 +69,8 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
> if (result)
> return result;
>
> - result = regmap_write(st->map, st->reg->int_enable, 0);
> + result = regmap_update_bits(st->map, st->reg->int_enable,
> + INV_MPU6050_BIT_DATA_RDY_EN, 0);
> if (result)
> return result;
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/7] iio: inv_mpu6050: Support i2c master and external readings Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
[RFC 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [RFC 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:40 +0200
Re: [RFC 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-05-05 14:40 +0200
Re: [RFC 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Rob Herring <robh+dt@kernel.org> - 2016-05-05 15:20 +0200
Re: [RFC 5/7] iio: inv_mpu6050: Add support for auxiliary I2C master Peter Rosin <peda@axentia.se> - 2016-05-02 17:40 +0200
[PATCH 4/7] iio: inv_mpu6050: Cache non-volatile bits of user_ctrl Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [PATCH 4/7] iio: inv_mpu6050: Cache non-volatile bits of user_ctrl Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:40 +0200
[PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:30 +0200
Re: [PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-05-03 15:10 +0200
Re: [PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Jonathan Cameron <jic23@kernel.org> - 2016-05-04 16:40 +0200
Re: [PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-05-04 17:40 +0200
Re: [PATCH 6/7] iio: inv_mpu6050: Check channel configuration on preenable Jonathan Cameron <jic23@jic23.retrosnub.co.uk> - 2016-05-04 20:30 +0200
[PATCH 1/7] iio: inv_mpu6050: Do burst reads using spi/i2c directly Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [PATCH 1/7] iio: inv_mpu6050: Do burst reads using spi/i2c directly Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:30 +0200
Re: [PATCH 1/7] iio: inv_mpu6050: Do burst reads using spi/i2c directly Mark Brown <broonie@kernel.org> - 2016-05-02 17:30 +0200
[RFC 7/7] iio: inv_mpu6050: Add support for external sensors Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [RFC 7/7] iio: inv_mpu6050: Add support for external sensors Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:40 +0200
[PATCH 3/7] iio: inv_mpu6050: Only toggle DATA_RDY_EN in inv_reset_fifo Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [PATCH 3/7] iio: inv_mpu6050: Only toggle DATA_RDY_EN in inv_reset_fifo Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:30 +0200
[PATCH 2/7] iio: inv_mpu6050: Initial regcache support Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-04-29 21:10 +0200
Re: [PATCH 2/7] iio: inv_mpu6050: Initial regcache support Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:40 +0200
Re: [RFC 0/7] iio: inv_mpu6050: Support i2c master and external readings Jonathan Cameron <jic23@kernel.org> - 2016-05-01 23:40 +0200
Re: [RFC 0/7] iio: inv_mpu6050: Support i2c master and external readings Mark Brown <broonie@kernel.org> - 2016-05-02 17:30 +0200
Re: [RFC 0/7] iio: inv_mpu6050: Support i2c master and external readings Crestez Dan Leonard <leonard.crestez@intel.com> - 2016-05-03 13:30 +0200
Re: [RFC 0/7] iio: inv_mpu6050: Support i2c master and external readings Mark Brown <broonie@kernel.org> - 2016-05-03 13:40 +0200
csiph-web