[PATCH 1/1] i2c: documentation of how to set child bus numbers from the device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
--- 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.
+
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux