All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: Jonathan Cameron <jic23@kernel.org>,
	Crestez Dan Leonard <leonard.crestez@intel.com>,
	<linux-iio@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Daniel Baluta <daniel.baluta@intel.com>,
	<linux-i2c@vger.kernel.org>, Wolfram Sang <wsa@the-dreams.de>,
	<devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH] iio: inv_mpu6050: Add support for auxiliary I2C master
Date: Wed, 27 Apr 2016 10:39:17 +0200	[thread overview]
Message-ID: <6ab228db-9695-ac22-9c65-fd15c4837c45@axentia.se> (raw)
In-Reply-To: <a978ad85-8191-7506-8090-809f89d0b2e2@kernel.org>

Hi!

On 2016-04-23 23:32, Jonathan Cameron wrote:
> On 20/04/16 18:17, Crestez Dan Leonard wrote:
>> The MPU has an auxiliary I2C bus for connecting external
>> sensors. This bus has two operating modes:
>> * pass-through, which connects the primary and auxiliary busses
>> together. This is already supported via an i2c mux.
>> * I2C master mode, where the mpu60x0 acts as a master to any external
>> connected sensors. This is implemented by this patch.
>>
>> This I2C master mode also works when the MPU itself is connected via
>> SPI.
>>
>> I2C master supports up to 5 slaves. Slaves 0-3 have a common operating
>> mode while slave 4 is different. This patch implements an i2c adapter
>> using slave 4 because it has a cleaner interface and it has an
>> interrupt that signals when data from slave to master arrived.
>>
>> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
> This one needs acks from:
>
> Device tree maintainer (odd binding ;)
> Peter Rosin (odd binding interacting with the mux support)
> Wolfram (it has a whole i2c master driver in here).
>
> (just thought I'd list these for the avoidance of doubt).

I spot some overlap with the questions in "[RFC] i2c: device-tree:
Handling child nodes which are not i2c devices"
http://marc.info/?l=linux-i2c&m=146073452819116&w=2

And I think I agree with Stephen Warren that an intermediate placeholder
node would make sense. I.e.

    mpu6050@68 {
        compatible = "...";
        reg = <0x68>;
        ...
        i2c-aux-mux {
            i2c@0 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0>;

                foo@44 {
                    compatible = "bar";
                    reg = <0x44>;
                    ...
                }
            }
        }
    }

Or

    mpu6050@68 {
        compatible = "...";
        reg = <0x68>;
        ...
        i2c-aux-master {
            #address-cells = <1>;
            #size-cells = <0>;

            gazonk@44 {
                compatible = "baz";
                reg = <0x44>;
                ...
            }
        }
    }

depending on if you want an aux-mux or an aux-master.

But I don't know if that intermediate i2c-aux-mux node causes any
problems?

Cheers,
Peter

WARNING: multiple messages have this Message-ID (diff)
From: Peter Rosin <peda@axentia.se>
To: Jonathan Cameron <jic23@kernel.org>,
	Crestez Dan Leonard <leonard.crestez@intel.com>,
	linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Daniel Baluta <daniel.baluta@intel.com>,
	linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>,
	devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH] iio: inv_mpu6050: Add support for auxiliary I2C master
Date: Wed, 27 Apr 2016 10:39:17 +0200	[thread overview]
Message-ID: <6ab228db-9695-ac22-9c65-fd15c4837c45@axentia.se> (raw)
In-Reply-To: <a978ad85-8191-7506-8090-809f89d0b2e2@kernel.org>

Hi!

On 2016-04-23 23:32, Jonathan Cameron wrote:
> On 20/04/16 18:17, Crestez Dan Leonard wrote:
>> The MPU has an auxiliary I2C bus for connecting external
>> sensors. This bus has two operating modes:
>> * pass-through, which connects the primary and auxiliary busses
>> together. This is already supported via an i2c mux.
>> * I2C master mode, where the mpu60x0 acts as a master to any external
>> connected sensors. This is implemented by this patch.
>>
>> This I2C master mode also works when the MPU itself is connected via
>> SPI.
>>
>> I2C master supports up to 5 slaves. Slaves 0-3 have a common operating
>> mode while slave 4 is different. This patch implements an i2c adapter
>> using slave 4 because it has a cleaner interface and it has an
>> interrupt that signals when data from slave to master arrived.
>>
>> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
> This one needs acks from:
>
> Device tree maintainer (odd binding ;)
> Peter Rosin (odd binding interacting with the mux support)
> Wolfram (it has a whole i2c master driver in here).
>
> (just thought I'd list these for the avoidance of doubt).

I spot some overlap with the questions in "[RFC] i2c: device-tree:
Handling child nodes which are not i2c devices"
http://marc.info/?l=linux-i2c&m=146073452819116&w=2

And I think I agree with Stephen Warren that an intermediate placeholder
node would make sense. I.e.

    mpu6050@68 {
        compatible = "...";
        reg = <0x68>;
        ...
        i2c-aux-mux {
            i2c@0 {
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0>;

                foo@44 {
                    compatible = "bar";
                    reg = <0x44>;
                    ...
                }
            }
        }
    }

Or

    mpu6050@68 {
        compatible = "...";
        reg = <0x68>;
        ...
        i2c-aux-master {
            #address-cells = <1>;
            #size-cells = <0>;

            gazonk@44 {
                compatible = "baz";
                reg = <0x44>;
                ...
            }
        }
    }

depending on if you want an aux-mux or an aux-master.

But I don't know if that intermediate i2c-aux-mux node causes any
problems?

Cheers,
Peter

  reply	other threads:[~2016-04-27  8:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20 17:17 [PATCH] iio: inv_mpu6050: Add support for auxiliary I2C master Crestez Dan Leonard
2016-04-20 18:17 ` kbuild test robot
2016-04-20 18:17   ` kbuild test robot
2016-04-21 10:02   ` Crestez Dan Leonard
2016-04-23 21:32 ` Jonathan Cameron
2016-04-27  8:39   ` Peter Rosin [this message]
2016-04-27  8:39     ` Peter Rosin
2016-04-28 10:39     ` Crestez Dan Leonard
2016-04-29  9:29       ` Peter Rosin
2016-04-29  9:29         ` Peter Rosin
2016-04-29 10:09         ` Peter Rosin
2016-04-29 10:09           ` Peter Rosin
2016-04-20 20:31 Peter Rosin
2016-04-20 20:31 ` Peter Rosin
2016-04-21 12:01 ` Crestez Dan Leonard
2016-04-21 13:56 Peter Rosin
2016-04-21 13:56 ` Peter Rosin
2016-04-21 13:56 ` Peter Rosin
2016-04-22 10:15 ` Crestez Dan Leonard
2016-04-22 11:01 Peter Rosin

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=6ab228db-9695-ac22-9c65-fd15c4837c45@axentia.se \
    --to=peda@axentia.se \
    --cc=daniel.baluta@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=leonard.crestez@intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    /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.