diff mbox

[04/10] i2c: i2c-mux-i2cs: Add device tree bindings

Message ID 1475853669-22480-5-git-send-email-pantelis.antoniou@konsulko.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Pantelis Antoniou Oct. 7, 2016, 3:21 p.m. UTC
From: Georgi Vlaev <gvlaev@juniper.net>

Add binding document for the i2c mux driver of Juniper's I2CS FPGA.

Signed-off-by: Georgi Vlaev <gvlaev@juniper.net>
[Ported from Juniper kernel]
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
 .../devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt   | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt

Comments

Peter Rosin Oct. 10, 2016, 3:48 p.m. UTC | #1
On 2016-10-07 17:21, Pantelis Antoniou wrote:
> From: Georgi Vlaev <gvlaev@juniper.net>
> 
> Add binding document for the i2c mux driver of Juniper's I2CS FPGA.
> 
> Signed-off-by: Georgi Vlaev <gvlaev@juniper.net>
> [Ported from Juniper kernel]
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  .../devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt   | 27 ++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> new file mode 100644
> index 0000000..03d917f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> @@ -0,0 +1,27 @@
> +* Juniper I2C Mux on I2CS
> +
> +	I2C mux driver for switching the RE access to the FPC i2c bus.
> +	Compatible with the FPC variant of the I2CS.
> +
> +Required properties:
> +
> +  - compatible: "jnx,i2cs-mux-i2cs".

jnx,i2c-mux-i2cs

> +
> +The following required properties are defined externally:
> +
> +  - Standard I2C mux properties. See i2c-mux.txt in this directory.

To accommodate changes pending for 4.9, change "mux" to "gate" in
this line...

> +  - I2C child bus nodes. See i2c-mux.txt in this directory.

This line is wrong since the child nodes themselves are optional in
i2c-gate.txt (and i2c-mux.txt). I guess you can just drop it since
the child nodes are mentioned in i2c-gate.txt (and i2c-mux.txt).

> +
> +Example:
> +
> +fpc0_mux {
> +	compatible = "jnx,i2c-mux-i2cs";
> +	#address-cells = <1>;
> +	#size-cells = <0>;

...drop these two...

> +
> +	fpc0i2c0: i2c@0 {

...change i2c@0 to i2c-gate...

> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;

...and drop reg.

Cheers,
Peter

> +	};
> +};
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring (Arm) Oct. 10, 2016, 8:25 p.m. UTC | #2
On Fri, Oct 07, 2016 at 06:21:03PM +0300, Pantelis Antoniou wrote:
> From: Georgi Vlaev <gvlaev@juniper.net>
> 
> Add binding document for the i2c mux driver of Juniper's I2CS FPGA.
> 
> Signed-off-by: Georgi Vlaev <gvlaev@juniper.net>
> [Ported from Juniper kernel]
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
>  .../devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt   | 27 ++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> new file mode 100644
> index 0000000..03d917f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
> @@ -0,0 +1,27 @@
> +* Juniper I2C Mux on I2CS
> +
> +	I2C mux driver for switching the RE access to the FPC i2c bus.

What is RE?

> +	Compatible with the FPC variant of the I2CS.
> +
> +Required properties:
> +
> +  - compatible: "jnx,i2cs-mux-i2cs".
> +
> +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:
> +
> +fpc0_mux {
> +	compatible = "jnx,i2c-mux-i2cs";
> +	#address-cells = <1>;
> +	#size-cells = <0>;

Needs some address? 

> +
> +	fpc0i2c0: i2c@0 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		reg = <0>;
> +	};
> +};
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pantelis Antoniou Oct. 17, 2016, 7:11 p.m. UTC | #3
Hi Rob,

> On Oct 10, 2016, at 18:48 , Peter Rosin <peda@axentia.se> wrote:
> 
> On 2016-10-07 17:21, Pantelis Antoniou wrote:
>> From: Georgi Vlaev <gvlaev@juniper.net>
>> 
>> Add binding document for the i2c mux driver of Juniper's I2CS FPGA.
>> 
>> Signed-off-by: Georgi Vlaev <gvlaev@juniper.net>
>> [Ported from Juniper kernel]
>> Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>> ---
>> .../devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt   | 27 ++++++++++++++++++++++
>> 1 file changed, 27 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
>> 
>> diff --git a/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
>> new file mode 100644
>> index 0000000..03d917f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
>> @@ -0,0 +1,27 @@
>> +* Juniper I2C Mux on I2CS
>> +
>> +	I2C mux driver for switching the RE access to the FPC i2c bus.
>> +	Compatible with the FPC variant of the I2CS.
>> +
>> +Required properties:
>> +
>> +  - compatible: "jnx,i2cs-mux-i2cs".
> 
> jnx,i2c-mux-i2cs
> 

OK.

>> +
>> +The following required properties are defined externally:
>> +
>> +  - Standard I2C mux properties. See i2c-mux.txt in this directory.
> 
> To accommodate changes pending for 4.9, change "mux" to "gate" in
> this lineā€¦
> 

OK, interesting.


>> +  - I2C child bus nodes. See i2c-mux.txt in this directory.
> 
> This line is wrong since the child nodes themselves are optional in
> i2c-gate.txt (and i2c-mux.txt). I guess you can just drop it since
> the child nodes are mentioned in i2c-gate.txt (and i2c-mux.txt).
> 

OK then.

>> +
>> +Example:
>> +
>> +fpc0_mux {
>> +	compatible = "jnx,i2c-mux-i2cs";
>> +	#address-cells = <1>;
>> +	#size-cells = <0>;
> 
> ...drop these two...
> 
>> +
>> +	fpc0i2c0: i2c@0 {
> 
> ...change i2c@0 to i2c-gate...
> 
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +		reg = <0>;
> 
> ...and drop reg.
> 
> Cheers,
> Peter
> 

OK on all.

>> +	};
>> +};

--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
new file mode 100644
index 0000000..03d917f
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/jnx,i2c-mux-i2cs.txt
@@ -0,0 +1,27 @@ 
+* Juniper I2C Mux on I2CS
+
+	I2C mux driver for switching the RE access to the FPC i2c bus.
+	Compatible with the FPC variant of the I2CS.
+
+Required properties:
+
+  - compatible: "jnx,i2cs-mux-i2cs".
+
+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:
+
+fpc0_mux {
+	compatible = "jnx,i2c-mux-i2cs";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	fpc0i2c0: i2c@0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+	};
+};