devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: "Jan Lübbe" <jlu@pengutronix.de>
Cc: linux-i2c@vger.kernel.org, linux-sh@vger.kernel.org,
	Magnus Damm <magnus.damm@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Subject: Re: [RFC v2 2/4] dt-bindings: i2c: mux: demux-pinctrl: add bindings
Date: Wed, 13 Jan 2016 14:02:28 +0100	[thread overview]
Message-ID: <20160113130227.GG1540@katana> (raw)
In-Reply-To: <1452185798.2915.44.camel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

Hi Jan,

> > +Required properties:
> > +- compatible: "i2c-demux-pinctrl"
> > +- i2c-parent: List of phandles of I2C masters available for selection. The first
> > +	      one will be used as default.
> > +- i2c-bus-name: The name of this bus. Also needed as pinctrl-name for the I2C
> > +		parents.
> [...]
> > +	i2chdmi: i2c@8 {
> > +		compatible = "i2c-demux-pinctrl";
> > +		i2c-parent = <&gpioi2c>, <&iic2>, <&i2c2>;
> > +		i2c-bus-name = "i2c-hdmi";
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> [...]
> > +	gpioi2c: i2c@9 {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +		compatible = "i2c-gpio";
> [...]
> > +&i2c2	{
> > +	pinctrl-0 = <&i2c2_pins>;
> > +	pinctrl-names = "i2c-hdmi";
> > +
> > +	clock-frequency = <100000>;
> > +};
> [...]
> > +&iic2	{
> > +	pinctrl-0 = <&iic2_pins>;
> > +	pinctrl-names = "i2c-hdmi";
> > +
> > +	clock-frequency = <100000>;
> > +};
> [...]
> 
> It seems that the demux-pinctrl driver reconfigures the pinctrl settings
> for the parent devices. I would have expected to have alternative
> pinctrl state on the demux node support switching the same external pins
> between the different controllers. Wouldn't it be possible to have
> pinctrl conflicts between &i2c2_pins and &iic2_pins otherwise?

I don't think so. Before i2c2 is enabled, iic2 gets disabled (status =
"disabled" via OF_DYNAMIC) and thus the pins get free. Doing it this
way, you could even have something like this:

	pinctrl-0 = <&iic2_pins>, <&iic2_c_pins>;
	pinctrl-names = "i2c-hdmi", "i2c-sensors";

which allows you to demux this controller to this or that bus. I haven't
tested this, though.

   Wolfram


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-13 13:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 13:51 [RFC v2 0/4] i2c/of: switch I2C IP cores at runtime via OF_DYNAMIC Wolfram Sang
2016-01-06 13:51 ` [RFC v2 1/4] of: make of_mutex public Wolfram Sang
2016-01-06 14:26   ` Geert Uytterhoeven
2016-01-06 13:51 ` [RFC v2 2/4] dt-bindings: i2c: mux: demux-pinctrl: add bindings Wolfram Sang
2016-01-06 14:30   ` Geert Uytterhoeven
2016-01-13 12:52     ` Wolfram Sang
2016-01-13 14:07       ` Sergei Shtylyov
2016-01-07 16:56   ` Jan Lübbe
2016-01-13 13:02     ` Wolfram Sang [this message]
2016-01-11  2:52   ` Rob Herring
2016-01-11  8:01     ` Geert Uytterhoeven
2016-01-06 13:51 ` [RFC v2 3/4] i2c: mux: demux-pinctrl: add driver Wolfram Sang
     [not found]   ` <1452088285-6427-4-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2016-01-06 14:20     ` Geert Uytterhoeven
2016-01-13 12:55       ` Wolfram Sang
2016-01-13 16:16         ` Geert Uytterhoeven
2016-01-06 17:08   ` Rob Herring
2016-01-13 12:55     ` Wolfram Sang
2016-01-06 13:51 ` [RFC v2 4/4] ARM: shmobile: r8a7790: rework dts to use i2c demuxer Wolfram Sang

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=20160113130227.GG1540@katana \
    --to=wsa@the-dreams.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jlu@pengutronix.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=pantelis.antoniou@konsulko.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 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).