From: Guenter Roeck <linux@roeck-us.net>
To: Peter Rosin <peda@axentia.se>, devicetree@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kalle Valo <kvalo@codeaurora.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Jiri Slaby <jslaby@suse.cz>,
linux-i2c@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: i2c: add bindings for nxp,pca9541
Date: Mon, 27 Jun 2016 06:17:36 -0700 [thread overview]
Message-ID: <57712770.3040204@roeck-us.net> (raw)
In-Reply-To: <1467022282-21062-1-git-send-email-peda@axentia.se>
On 06/27/2016 03:11 AM, Peter Rosin wrote:
> Fill the gap for this pre-existing driver.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
> .../devicetree/bindings/i2c/i2c-arb-pca9541.txt | 33 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 34 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt
>
> Hi!
>
> I'm wondering about this driver. It is not a trivial device, and yet it
> has historically relied on the i2c core matching the chip w/o vendor
> prefix. This is not ideal. But what to do about the driver implementing
> this in terms of an i2c-mux, somthing which the chip is not; It is an
> i2c arbitrator. It just happens to rely on the i2c mux core also handling
> i2c gates and i2c arbitrators. But that seems like a Linux detail. So I
> don't know what to do here?
>
The concept of arbitrators didn't exist when I wrote the driver. I would not
have a problem with renaming the file if that is what you are asking for.
> That is, the patch - as is - describes something that would be trivial to
> support today, but at the same time it seems to be too tied to Linux.
>
> The problem is that the i2c@0 intermediate node is not really needed, but
> at the same time removing it would cause a disruption for the driver since
> it can't really use the i2c mux core if that node isn't there. I don't
> see a simple way to fix that in the i2c mux core either (but admittedly
> haven't given it too much thought).
>
The gpio arbitrator uses the same principle as well. Why not just leave it
alone ? Besides, I think it is a good idea to have it, since it groups
the i2c devices behind the chip together. I would not consider that to be
a Linuxism, but a design choice.
Guenter
> Any suggestions?
>
> Cheers,
> Peter
>
> PS. The driver source is in drivers/i2c/muxes/i2c-mux-pca9541.c
>
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt b/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt
> new file mode 100644
> index 000000000000..edbe84935906
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-arb-pca9541.txt
> @@ -0,0 +1,33 @@
> +* NXP PCA9541 I2C bus master selector
> +
> +Required Properties:
> +
> + - compatible: Must be "nxp,pca9541"
> +
> + - reg: The I2C address of the device.
> +
> + The following required properties are defined externally:
> +
> + - Standard I2C mux properties. See i2c-mux.txt in this directory.
> + - I2C child bus nodes. See i2c-mux.txt in this directory.
> +
> +
> +Example:
> +
> + i2c-arbitrator@74 {
> + compatible = "nxp,pca9541";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0x74>;
> +
> + i2c@0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + reg = <0>;
> +
> + eeprom@54 {
> + compatible = "at,24c08";
> + reg = <0x54>;
> + };
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e1b090f86e0d..3dd44d0d166c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -5521,6 +5521,7 @@ S: Maintained
> F: Documentation/i2c/i2c-topology
> F: Documentation/i2c/muxes/
> F: Documentation/devicetree/bindings/i2c/i2c-mux*
> +F: Documentation/devicetree/bindings/i2c/i2c-arb*
> F: drivers/i2c/i2c-mux.c
> F: drivers/i2c/muxes/
> F: include/linux/i2c-mux.h
>
next prev parent reply other threads:[~2016-06-27 13:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 10:11 [PATCH] dt-bindings: i2c: add bindings for nxp,pca9541 Peter Rosin
2016-06-27 10:11 ` Peter Rosin
2016-06-27 13:17 ` Guenter Roeck [this message]
2016-06-27 16:27 ` Peter Rosin
2016-06-27 16:27 ` Peter Rosin
2016-07-01 1:20 ` Rob Herring
2016-07-06 10:12 ` Peter Rosin
2016-07-06 10:12 ` Peter Rosin
2016-07-06 15:12 ` Guenter Roeck
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=57712770.3040204@roeck-us.net \
--to=linux@roeck-us.net \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=kvalo@codeaurora.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mchehab@kernel.org \
--cc=peda@axentia.se \
--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.