linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used
@ 2016-08-31  8:02 Peter Rosin
  2016-09-03 16:30 ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Rosin @ 2016-08-31  8:02 UTC (permalink / raw)
  To: linux-iio
  Cc: Peter Rosin, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald, linux-kernel,
	Crestez Dan Leonard

The i2c mux core can then take appropriate action depending on if it is
used for an actual i2c mux, or for an arbitrator or gate. In this case
it is used as a gate.

This will make devicetree bindings simpler when they are eventually
added.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
 drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

So, this depends on the i2c-mux-dt-3 branch [1] that Jonathan
pulled to support the new mpu-3050 gyroscope driver. I had
planned to submit this post 4.9-rc1, but since the iio tree
got the prerequisite already, I'm sending it right away.

Cheers,
Peter

[1] https://github.com/peda-r/i2c-mux.git i2c-mux-dt-3

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
index 19580d1db597..2c3f8964a3ea 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
@@ -126,7 +126,7 @@ static int inv_mpu_probe(struct i2c_client *client,
 
 	st = iio_priv(dev_get_drvdata(&client->dev));
 	st->muxc = i2c_mux_alloc(client->adapter, &client->dev,
-				 1, 0, I2C_MUX_LOCKED,
+				 1, 0, I2C_MUX_LOCKED | I2C_MUX_GATE,
 				 inv_mpu6050_select_bypass,
 				 inv_mpu6050_deselect_bypass);
 	if (!st->muxc) {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used
  2016-08-31  8:02 [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used Peter Rosin
@ 2016-09-03 16:30 ` Jonathan Cameron
  2016-09-13 20:44   ` Linus Walleij
  2016-11-10  9:23   ` Peter Rosin
  0 siblings, 2 replies; 5+ messages in thread
From: Jonathan Cameron @ 2016-09-03 16:30 UTC (permalink / raw)
  To: Peter Rosin, linux-iio
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel,
	Crestez Dan Leonard

On 31/08/16 09:02, Peter Rosin wrote:
> The i2c mux core can then take appropriate action depending on if it is
> used for an actual i2c mux, or for an arbitrator or gate. In this case
> it is used as a gate.
> 
> This will make devicetree bindings simpler when they are eventually
> added.
> 
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> So, this depends on the i2c-mux-dt-3 branch [1] that Jonathan
> pulled to support the new mpu-3050 gyroscope driver. I had
> planned to submit this post 4.9-rc1, but since the iio tree
> got the prerequisite already, I'm sending it right away.
It's not there yet as the mpu-3050 has to go round again
for other reasons.  As such I haven't yet pulled your branch.
This patch isn't going to justify the pull on it's own.

I'll try and remember to pick it up when Linus gets back with
the final mpu-3050 and I pull your tree in.

If not give me a poke!

Jonathan
> 
> Cheers,
> Peter
> 
> [1] https://github.com/peda-r/i2c-mux.git i2c-mux-dt-3
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> index 19580d1db597..2c3f8964a3ea 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> @@ -126,7 +126,7 @@ static int inv_mpu_probe(struct i2c_client *client,
>  
>  	st = iio_priv(dev_get_drvdata(&client->dev));
>  	st->muxc = i2c_mux_alloc(client->adapter, &client->dev,
> -				 1, 0, I2C_MUX_LOCKED,
> +				 1, 0, I2C_MUX_LOCKED | I2C_MUX_GATE,
>  				 inv_mpu6050_select_bypass,
>  				 inv_mpu6050_deselect_bypass);
>  	if (!st->muxc) {
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used
  2016-09-03 16:30 ` Jonathan Cameron
@ 2016-09-13 20:44   ` Linus Walleij
  2016-11-10  9:23   ` Peter Rosin
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2016-09-13 20:44 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Peter Rosin, linux-iio, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald, linux-kernel, Crestez Dan Leonard

On Sat, Sep 3, 2016 at 6:30 PM, Jonathan Cameron <jic23@kernel.org> wrote:
> On 31/08/16 09:02, Peter Rosin wrote:
>> The i2c mux core can then take appropriate action depending on if it is
>> used for an actual i2c mux, or for an arbitrator or gate. In this case
>> it is used as a gate.
>>
>> This will make devicetree bindings simpler when they are eventually
>> added.
>>
>> Signed-off-by: Peter Rosin <peda@axentia.se>
>> ---
>>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> So, this depends on the i2c-mux-dt-3 branch [1] that Jonathan
>> pulled to support the new mpu-3050 gyroscope driver. I had
>> planned to submit this post 4.9-rc1, but since the iio tree
>> got the prerequisite already, I'm sending it right away.
> It's not there yet as the mpu-3050 has to go round again
> for other reasons.  As such I haven't yet pulled your branch.
> This patch isn't going to justify the pull on it's own.
>
> I'll try and remember to pick it up when Linus gets back with
> the final mpu-3050 and I pull your tree in.

I think it sounds stressy and messy.

I'll just hold the driver for v4.10, there is no hurry.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used
  2016-09-03 16:30 ` Jonathan Cameron
  2016-09-13 20:44   ` Linus Walleij
@ 2016-11-10  9:23   ` Peter Rosin
  2016-11-12 14:45     ` Jonathan Cameron
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Rosin @ 2016-11-10  9:23 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel,
	Crestez Dan Leonard

On 2016-09-03 18:30, Jonathan Cameron wrote:
> On 31/08/16 09:02, Peter Rosin wrote:
>> The i2c mux core can then take appropriate action depending on if it is
>> used for an actual i2c mux, or for an arbitrator or gate. In this case
>> it is used as a gate.
>>
>> This will make devicetree bindings simpler when they are eventually
>> added.
>>
>> Signed-off-by: Peter Rosin <peda@axentia.se>
>> ---
>>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> So, this depends on the i2c-mux-dt-3 branch [1] that Jonathan
>> pulled to support the new mpu-3050 gyroscope driver. I had
>> planned to submit this post 4.9-rc1, but since the iio tree
>> got the prerequisite already, I'm sending it right away.
> It's not there yet as the mpu-3050 has to go round again
> for other reasons.  As such I haven't yet pulled your branch.
> This patch isn't going to justify the pull on it's own.
> 
> I'll try and remember to pick it up when Linus gets back with
> the final mpu-3050 and I pull your tree in.
> 
> If not give me a poke!

Friendly *poke* :-)

Cheers,
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used
  2016-11-10  9:23   ` Peter Rosin
@ 2016-11-12 14:45     ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2016-11-12 14:45 UTC (permalink / raw)
  To: Peter Rosin, linux-iio
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald, linux-kernel,
	Crestez Dan Leonard

On 10/11/16 09:23, Peter Rosin wrote:
> On 2016-09-03 18:30, Jonathan Cameron wrote:
>> On 31/08/16 09:02, Peter Rosin wrote:
>>> The i2c mux core can then take appropriate action depending on if it is
>>> used for an actual i2c mux, or for an arbitrator or gate. In this case
>>> it is used as a gate.
>>>
>>> This will make devicetree bindings simpler when they are eventually
>>> added.
>>>
>>> Signed-off-by: Peter Rosin <peda@axentia.se>
>>> ---
>>>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> So, this depends on the i2c-mux-dt-3 branch [1] that Jonathan
>>> pulled to support the new mpu-3050 gyroscope driver. I had
>>> planned to submit this post 4.9-rc1, but since the iio tree
>>> got the prerequisite already, I'm sending it right away.
>> It's not there yet as the mpu-3050 has to go round again
>> for other reasons.  As such I haven't yet pulled your branch.
>> This patch isn't going to justify the pull on it's own.
>>
>> I'll try and remember to pick it up when Linus gets back with
>> the final mpu-3050 and I pull your tree in.
>>
>> If not give me a poke!
> 
> Friendly *poke* :-)
Applied to the togreg branch of iio.git

Thanks for the reminder!

Jonathan
> 
> Cheers,
> Peter
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-12 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31  8:02 [PATCH] iio: imu: inv_mpu6050: inform the i2c mux core about how it is used Peter Rosin
2016-09-03 16:30 ` Jonathan Cameron
2016-09-13 20:44   ` Linus Walleij
2016-11-10  9:23   ` Peter Rosin
2016-11-12 14:45     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).