All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Adriana Reus <adriana.reus@intel.com>
Cc: linux-iio@vger.kernel.org, srinivas.pandruvada@linux.intel.com,
	ggao@invensense.com
Subject: Re: [PATCH 1/5] iio: imu: inv-mpu6050: Fix interrupt pin configuration
Date: Sat, 30 Jan 2016 17:16:14 +0000	[thread overview]
Message-ID: <56ACEFDE.2050904@kernel.org> (raw)
In-Reply-To: <1454147028-22449-2-git-send-email-adriana.reus@intel.com>

On 30/01/16 09:43, Adriana Reus wrote:
> The select/deselect_bypass duo writes the irq number into the interrupt
> configuration register.
> If there is a i2c slave device connected to the mpu (eg. a magnetometer)
> then this can hinder interrupt delivery for the accelerometer and
> gyroscope.
> Set this register to the default configuration.
> 
> Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Hmm. I'd ideally like an invensense ack on this (and the series ideally!)
I'm not entirely clear what the original intent here was.

Jonathan
> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 ++--
>  drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h  | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> index f0e0609..5fe1dd8 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
> @@ -129,7 +129,7 @@ static int inv_mpu6050_select_bypass(struct i2c_adapter *adap, void *mux_priv,
>  	if (!ret) {
>  		st->powerup_count++;
>  		ret = inv_mpu6050_write_reg_unlocked(st, st->reg->int_pin_cfg,
> -						     st->client->irq |
> +						     INV_MPU6050_INT_PIN_CFG |
>  						     INV_MPU6050_BIT_BYPASS_EN);
>  	}
>  write_error:
> @@ -147,7 +147,7 @@ static int inv_mpu6050_deselect_bypass(struct i2c_adapter *adap,
>  	mutex_lock(&indio_dev->mlock);
>  	/* It doesn't really mattter, if any of the calls fails */
>  	inv_mpu6050_write_reg_unlocked(st, st->reg->int_pin_cfg,
> -				       st->client->irq);
> +				       INV_MPU6050_INT_PIN_CFG);
>  	st->powerup_count--;
>  	if (!st->powerup_count)
>  		inv_mpu6050_write_reg_unlocked(st, st->reg->pwr_mgmt_1,
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
> index db0a4a2..455b99d 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h
> @@ -185,6 +185,7 @@ struct inv_mpu6050_state {
>  
>  #define INV_MPU6050_REG_INT_PIN_CFG	0x37
>  #define INV_MPU6050_BIT_BYPASS_EN	0x2
> +#define INV_MPU6050_INT_PIN_CFG		0
>  
>  /* init parameters */
>  #define INV_MPU6050_INIT_FIFO_RATE           50
> 


  reply	other threads:[~2016-01-30 17:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30  9:43 [RFC PATCH 0/5] iio: imu: inv_mpu6050: Split driver into core and I2C/SPI functionality Adriana Reus
2016-01-30  9:43 ` [PATCH 1/5] iio: imu: inv-mpu6050: Fix interrupt pin configuration Adriana Reus
2016-01-30 17:16   ` Jonathan Cameron [this message]
2016-01-30  9:43 ` [PATCH 2/5] iio: inv_mpu6050: Remove unused parameter Adriana Reus
2016-01-30 17:18   ` Jonathan Cameron
2016-01-30  9:43 ` [RFC PATCH 3/5] iio: imu: inv_mpu6050: Use regmap instead of i2c specific functions Adriana Reus
2016-01-30 17:21   ` Jonathan Cameron
2016-01-30  9:43 ` [RFC PATCH 4/5] iio: imu: inv_mpu6050: Separate driver into core and i2c functionality Adriana Reus
2016-01-30 17:37   ` Jonathan Cameron
2016-01-30  9:43 ` [RFC PATCH 5/5] iio: imu: inv_mpu6050: Add SPI support for MPU6000 Adriana Reus
2016-01-30 17:48   ` Jonathan Cameron
2016-01-30 17:11 ` [RFC PATCH 0/5] iio: imu: inv_mpu6050: Split driver into core and I2C/SPI functionality Jonathan Cameron
2016-02-01  9:01   ` Adriana Reus
2016-02-02  1:11     ` Ge Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56ACEFDE.2050904@kernel.org \
    --to=jic23@kernel.org \
    --cc=adriana.reus@intel.com \
    --cc=ggao@invensense.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.