All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Feretich <bob.feretich-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	"linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 1/1] i2c: documentation of how to set child bus numbers from the device tree
Date: Thu, 07 May 2015 21:57:09 -0700	[thread overview]
Message-ID: <554C4225.2030706@rafresearch.com> (raw)
In-Reply-To: <20150314110028.GB970@katana>

This patch extends the i2cmux description to document how i2c child bus
numbers can be set from the device tree.

Signed-off-by: Bob Feretich <bob.feretich-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
---
--- a/Documentation/devicetree/bindings/i2c/i2c-mux.txt	2015-05-07 
13:27:32.571371080 -0700
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux.txt	2015-05-07 
13:31:58.699044026 -0700
@@ -58,3 +58,78 @@ Example :
  			};
  		};
  	};
+
+The I2C subsystem will assign names to the child busses dynamically in
+the form i2c-n; where 'n' is an incrementing number starting with the
+number following the previously highest allocated bus number.
+
+Aliases may be used to assign static child bus names. The alias name
+must be of the form i2cnn where nn is numeric. The numeric part (nn) is
+used to set the bus number.
+
+Example :
+
+/ {
+	aliases {
+		i2c10 = &im0;
+		i2c11 = &im1;
+		i2c12 = &im2;
+		i2c13 = &im3;
+		i2c14 = &im4;
+		i2c15 = &im5;
+		i2c16 = &im6;
+		i2c17 = &im7;
+	};
+};
+...
+	i2cmux@70 {
+	 	compatible = "nxp,pca9548";
+	 	#address-cells = <1>;
+	 	#size-cells = <0>;
+	 	reg = <0x70>;
+
+ im0:	i2cm@0 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0>;
+		};
+ im1:	i2cm@1 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <1>;
+		};
+ im2:	i2cm@2 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <2>;
+		};
+ im3:	i2cm@3 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <3>;
+		};
+ im4:	i2cm@4 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <4>;
+		};
+ im5:	i2cm@5 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <5>;
+		};
+ im6:	i2cm@6 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <6>;
+		};
+ im7:	i2cm@7 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <7>;
+		};
+	 };
+
+The above file segment causes the child i2c busses to be named
+i2c-10 through i2c-17.
+

      reply	other threads:[~2015-05-08  4:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  4:11 Another problem with I2C multiplexer bus naming Bob Feretich
     [not found] ` <1426133507.16219.YahooMailNeo-XYahOdtEMNm2Y7dhQGSVAJOW+3bF1jUfVpNB7YpNyf8@public.gmane.org>
2015-03-12  4:55   ` Another problem with I2C multiplexer bus naming - solved Bob Feretich
     [not found]     ` <1426136151.37151.YahooMailNeo-XYahOdtEMNlRBbKmAC7my5OW+3bF1jUfVpNB7YpNyf8@public.gmane.org>
2015-03-12  9:44       ` Wolfram Sang
2015-03-12 18:49         ` Bob Feretich
     [not found]           ` <5501DFCC.6010408-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
2015-03-14 10:49             ` Wolfram Sang
2015-03-12  9:29   ` Another problem with I2C multiplexer bus naming Danielle Costantino
2015-03-12  9:42   ` Wolfram Sang
2015-03-12 11:29     ` Wolfram Sang
2015-03-12 19:12       ` Bob Feretich
     [not found]         ` <5501E52D.9060400-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
2015-03-14 11:00           ` Wolfram Sang
2015-05-08  4:57             ` Bob Feretich [this message]

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=554C4225.2030706@rafresearch.com \
    --to=bob.feretich-8wbki1fapaosqv5zqcshkq@public.gmane.org \
    --cc=linux-devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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.