Documentation: dt-bindings: add adi,adgs1408 doc
Mircea Caprioru
maintainerPATCH v2 2/2 Documentation: dt-bindings: add adi,adgs1408 doc
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The bindings follow the standard SPI and mux bindings and do not require any additional custom properties.
---
Changelog V1 -> V2
- removed wildcard adgs140x
- removed removed required cells property
.../devicetree/bindings/mux/adi,adgs1408.txt | 39 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/mux/adi,adgs1408.txt
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +39 -0
@@ -0,0 +1,39 @@ +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux + +Required properties: +- compatible : "adi,adgs1408" or "adi,adgs1409" +* Standard mux-controller bindings as described in mux-controller.txt + +Optional properties: +- idle-state : if present, array of states that the mux controllers will have + when idle. The special state MUX_IDLE_AS_IS is the default and + MUX_IDLE_DISCONNECT is also supported. + +States 0 through 7 correspond to signals S1 through S8 in the datasheet. +For ADGS1409 only states 0 to 3 are available. + +Example: + + /* + * One mux controller. + * Mux 1 to 8 set to idle as is (no idle-state declared) + */ + &spi0 { + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>; + spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + } + + adc-mux@3 { + compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0", "test1", + "out_b0", "out_b1", "testb0", "testb1"; + + };
MAINTAINERS +1 -0
@@ -814,6 +814,7 @@ ANALOG DEVICES INC ADGS1408 DRIVER M: Mircea Caprioru <[email protected]> S: Supported F: drivers/mux/adgs1408.c +F: Documentation/devicetree/bindings/mux/adi,adgs1408.txt ANALOG DEVICES INC ADV7180 DRIVER M: Lars-Peter Clausen <[email protected]>
Signature · 1 line
2.17.1
Quoted 6 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The bindings follow the standard SPI and mux bindings and do not require any additional custom properties.
Signed-off-by Mircea Caprioru <[email protected]>---
Hi Mircea,
some time ago I tripped over this [1] patch 44acf1058790 ("dt-bindings:
submitting-patches: add guidance on patch content and subject") from Rob on the mailing list. Seems like the "rules" could be very well applied to your patch.
Best regards,
Michal
Quoted 3 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The bindings follow the standard SPI and mux bindings and do not require any additional custom properties.
However, both chips have general purpose output pins. I think it is customary to document the bindings for such things while at it?
Another thing that I'm wondering about is if it is at all possible to describe daisy-chained devices on an spi bus in the device tree?
Quoted 18 lines
Signed-off-by Mircea Caprioru <[email protected]>---
Changelog V1 -> V2
- removed wildcard adgs140x
- removed removed required cells property.../devicetree/bindings/mux/adi,adgs1408.txt | 39 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/mux/adi,adgs1408.txtDocumentation/devicetree/bindings/mux/adi,adgs1408.txt new file +0
-0
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 4
Quoted 4 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0@@ -0,0 +1,39 @@ +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux + +Required properties: +- compatible : "adi,adgs1408" or "adi,adgs1409"
I think it is preferred to have one compatible per line.
Quoted 5 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+* Standard mux-controller bindings as described in mux-controller.txt + +Optional properties: +- idle-state : if present, array of states that the mux controllers will have + when idle. The special state MUX_IDLE_AS_IS is the default and
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 19
Quoted 10 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +10
-0+ MUX_IDLE_DISCONNECT is also supported. + +States 0 through 7 correspond to signals S1 through S8 in the datasheet. +For ADGS1409 only states 0 to 3 are available. + +Example: + + /* + * One mux controller. + * Mux 1 to 8 set to idle as is (no idle-state declared)
What do you mean "Mux 1 to 8"? There is only one mux...
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 24
Quoted 5 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+ */ + &spi0 { + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>;
reg = <0> does not match @2 above.
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 30
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + } + + adc-mux@3 {
There is no reg property in this node. I think you should simply drop the @3.
Cheers,
Peter
Quoted 22 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +9
-0+ compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0", "test1", + "out_b0", "out_b1", "testb0", "testb1"; + + };MAINTAINERS +1
-0@@ -814,6 +814,7 @@ ANALOG DEVICES INC ADGS1408 DRIVER M: Mircea Caprioru <[email protected]> S: Supported F: drivers/mux/adgs1408.c +F: Documentation/devicetree/bindings/mux/adi,adgs1408.txt ANALOG DEVICES INC ADV7180 DRIVER M: Lars-Peter Clausen <[email protected]>
Caprioru, Mircea
maintainerQuoted 8 lines · Peter Rosin
Quoted 4 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The bindings follow the standard SPI and mux bindings and do not require any
additional custom properties.However, both chips have general purpose output pins. I think it is customary to document the bindings for such things while at it?
This functionality is not yet implemented in the driver. It does not make sense to document it just yet. Will add it when the driver implements it.
Quoted 4 lines
Another thing that I'm wondering about is if it is at all possible to describe daisy-chained devices on an spi bus in the device tree?
I'm not sure about this either. I will have to also look into this.
Quoted 14 lines
Quoted 14 lines
Signed-off-by Mircea Caprioru <[email protected]>---
Changelog V1 -> V2
- removed wildcard adgs140x
- removed removed required cells property.../devicetree/bindings/mux/adi,adgs1408.txt | 39 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) create mode 100644
Documentation/devicetree/bindings/mux/adi,adgs1408.txt
Quoted 13 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 4
Quoted 11 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0@@ -0,0 +1,39 @@ +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux + +Required properties: +- compatible : "adi,adgs1408" or "adi,adgs1409"I think it is preferred to have one compatible per line.
Ack.
Quoted 13 lines
Quoted 13 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +1
-0+* Standard mux-controller bindings as described in mux-controller.txt
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +3
-0+ +Optional properties: +- idle-state : if present, array of states that the muxcontrollers will have
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0+ when idle. The special state MUX_IDLE_AS_IS is the default and + MUX_IDLE_DISCONNECT is also supported. + +States 0 through 7 correspond to signals S1 through S8 in thedatasheet.
+For ADGS1409 only states 0 to 3 are available.
Quoted 8 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 19
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ +Example: + + /* + * One mux controller. + * Mux 1 to 8 set to idle as is (no idle-state declared)What do you mean "Mux 1 to 8"? There is only one mux...
I was reffering to the mux inputs, will rephrase this.
Quoted 8 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 24
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+ */ + &spi0 { + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>;reg = <0> does not match @2 above.
Ack.
Quoted 10 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 30
Quoted 7 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + } + + adc-mux@3 {There is no reg property in this node. I think you should simply drop the @3.
Ack.
Quoted 3 lines
Cheers,
Peter
Thanks,
Mircea
Quoted 25 lines
Quoted 23 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +9
-0+ compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0", "test1", + "out_b0", "out_b1", "testb0", "testb1"; + + };MAINTAINERS +1
-0@@ -814,6 +814,7 @@ ANALOG DEVICES INC ADGS1408 DRIVER M: Mircea Caprioru <[email protected]> S: Supported F: drivers/mux/adgs1408.c +F: Documentation/devicetree/bindings/mux/adi,adgs1408.txt ANALOG DEVICES INC ADV7180 DRIVER M: Lars-Peter Clausen <[email protected]>
Quoted 7 lines · Mircea
Quoted 6 lines · Peter Rosin
Quoted 4 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The bindings follow the standard SPI and mux bindings and do not require any
additional custom properties.
Quoted 6 lines
Quoted 2 lines
However, both chips have general purpose output pins. I think it is customary to document the bindings for such things while at it?
This functionality is not yet implemented in the driver. It does not make sense to document it just yet. Will add it when the driver implements it.
I disagree, and I also think 2/2 should come before 1/2, just to show that things are done in the proper order. That makes it clear that the driver does not implement random (or not yet existing) device-tree bindings.
The bindings should not document the driver, they should document the hardware/interfaces.
Quoted 5 lines
Quoted 4 lines
Another thing that I'm wondering about is if it is at all possible to describe daisy-chained devices on an spi bus in the device tree?
I'm not sure about this either. I will have to also look into this.
It was more of a general question for devicetree/spi experts, but I do not expect any generic solutions in this problem space...
Cheers,
Peter
Quoted 104 lines
Quoted 14 lines
Quoted 14 lines
Signed-off-by Mircea Caprioru <[email protected]>---
Changelog V1 -> V2
- removed wildcard adgs140x
- removed removed required cells property.../devicetree/bindings/mux/adi,adgs1408.txt | 39 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) create mode 100644
Documentation/devicetree/bindings/mux/adi,adgs1408.txtQuoted 13 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 4
Quoted 11 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0@@ -0,0 +1,39 @@ +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux + +Required properties: +- compatible : "adi,adgs1408" or "adi,adgs1409"I think it is preferred to have one compatible per line.
Ack.
Quoted 13 lines
Quoted 13 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +1
-0+* Standard mux-controller bindings as described in mux-controller.txt
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +3
-0+ +Optional properties: +- idle-state : if present, array of states that the muxcontrollers will have
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0+ when idle. The special state MUX_IDLE_AS_IS is the default and + MUX_IDLE_DISCONNECT is also supported. + +States 0 through 7 correspond to signals S1 through S8 in thedatasheet.
+For ADGS1409 only states 0 to 3 are available.Quoted 8 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 19
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ +Example: + + /* + * One mux controller. + * Mux 1 to 8 set to idle as is (no idle-state declared)What do you mean "Mux 1 to 8"? There is only one mux...
I was reffering to the mux inputs, will rephrase this.
Quoted 8 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 24
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+ */ + &spi0 { + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>;reg = <0> does not match @2 above.
Ack.
Quoted 10 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 30
Quoted 7 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + } + + adc-mux@3 {There is no reg property in this node. I think you should simply drop the @3.
Ack.
Quoted 3 lines
Cheers,
PeterThanks,
MirceaQuoted 24 lines
Quoted 23 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +9
-0+ compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0", "test1", + "out_b0", "out_b1", "testb0", "testb1"; + + };MAINTAINERS +1
-0@@ -814,6 +814,7 @@ ANALOG DEVICES INC ADGS1408 DRIVER M: Mircea Caprioru <[email protected]> S: Supported F: drivers/mux/adgs1408.c +F: Documentation/devicetree/bindings/mux/adi,adgs1408.txt ANALOG DEVICES INC ADV7180 DRIVER M: Lars-Peter Clausen <[email protected]>
Caprioru, Mircea
maintainerQuoted 18 lines · Peter Rosin
Quoted 8 lines · Mircea
Quoted 7 lines · Peter Rosin
Quoted 5 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The
bindings follow the standard SPI and mux bindings and do not require any
additional custom properties.Quoted 8 lines
Quoted 3 lines
However, both chips have general purpose output pins. I think it is
customary to document the bindings for such things while at it?This functionality is not yet implemented in the driver. It does not
make sense to document it just yet. Will add it when the driver implements it.
Quoted 8 lines
I disagree, and I also think 2/2 should come before 1/2, just to show that things are done in the proper order. That makes it clear that the
driver does not implement random (or not yet existing) device-tree bindings.The bindings should not document the driver, they should document the hardware/interfaces.
I was thinking of adding a custom property adi,gpos = <0 0 0 0>; to configure the general purpose outputs but i am open to any sugestions. What do you think of this approach ?
Regards,
Mircea
Quoted 128 lines
Quoted 9 lines
Quoted 7 lines
Another thing that I'm wondering about is if it is at all possible
to describe daisy-chained devices on an spi bus in the device tree?I'm not sure about this either. I will have to also look into this.
It was more of a general question for devicetree/spi experts, but I do
not expect any generic solutions in this problem space...Cheers,
PeterQuoted 109 lines
Quoted 14 lines
Quoted 14 lines
Signed-off-by Mircea Caprioru <[email protected]>---
Changelog V1 -> V2
- removed wildcard adgs140x
- removed removed required cells property.../devicetree/bindings/mux/adi,adgs1408.txt | 39 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 40 insertions(+) create mode 100644
Documentation/devicetree/bindings/mux/adi,adgs1408.txtQuoted 14 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 4
Quoted 12 lines
diff --git
a/Documentation/devicetree/bindings/mux/adi,adgs1408.txtb/Documentation/devicetree/bindings/mux/adi,adgs1408.txtnew file mode 100644
index 000000000000..6b1cbe326786Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +4
-0@@ -0,0 +1,39 @@ +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux + +Required properties: +- compatible : "adi,adgs1408" or "adi,adgs1409"I think it is preferred to have one compatible per line.
Ack.
Quoted 15 lines
Quoted 15 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +1
-0+* Standard mux-controller bindings as described in mux-controller.txt
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +3
-0+ +Optional properties: +- idle-state : if present, array of states that the muxcontrollers will have
+ when idle. The special stateMUX_IDLE_AS_ISis the default andDocumentation/devicetree/bindings/mux/adi,adgs1408.txt new file +3
-0+ MUX_IDLE_DISCONNECT is also supported. + +States 0 through 7 correspond to signals S1 through S8 in thedatasheet.
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +2
-0+For ADGS1409 only states 0 to 3 are available. +Quoted 8 lines
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+Example: + + /* + * One mux controller. + * Mux 1 to 8 set to idle as is (no idle-statedeclared)
What do you mean "Mux 1 to 8"? There is only one mux...
I was reffering to the mux inputs, will rephrase this.
Quoted 8 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 24
Quoted 6 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +5
-0+ */ + &spi0 { + mux: mux-controller@2 { + compatible = "adi,adgs1408"; + reg = <0>;reg = <0> does not match @2 above.
Ack.
Quoted 10 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt line 30
Quoted 7 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ spi-max-frequency = <1000000>; + #mux-control-cells = <0>; + }; + } + + adc-mux@3 {There is no reg property in this node. I think you should simply drop the @3.
Ack.
Quoted 3 lines
Cheers,
PeterThanks,
MirceaQuoted 26 lines
Quoted 26 lines
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +6
-0+ compatible = "io-channel-mux"; + io-channels = <&adc 1>; + io-channel-names = "parent"; + mux-controls = <&mux>; + + channels = "out_a0", "out_a1", "test0","test1",
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +1
-0+ "out_b0", "out_b1", "testb0","testb1";
Documentation/devicetree/bindings/mux/adi,adgs1408.txt new file +2
-0+ + };MAINTAINERS +1
-0@@ -814,6 +814,7 @@ ANALOG DEVICES INC ADGS1408 DRIVER M: Mircea Caprioru <[email protected]> S: Supported F: drivers/mux/adgs1408.c +F: Documentation/devicetree/bindings/mux/adi,adgs1408.txt
ANALOG DEVICES INC ADV7180 DRIVER
M: Lars-Peter Clausen <[email protected]>
Quoted 25 lines · Mircea
Quoted 24 lines · Peter Rosin
Quoted 8 lines · Mircea
Quoted 7 lines · Peter Rosin
Quoted 5 lines · Mircea Caprioru
Adding dt-bindings documentation for adgs1408/1409 multiplexer. The
bindings follow the standard SPI and mux bindings and do not require any
additional custom properties.Quoted 8 lines
Quoted 3 lines
However, both chips have general purpose output pins. I think it is
customary to document the bindings for such things while at it?This functionality is not yet implemented in the driver. It does not
make sense to document it just yet. Will add it when the driver implements it.I disagree, and I also think 2/2 should come before 1/2, just to show that things are done in the proper order. That makes it clear that the
driver does not implement random (or not yet existing) device-tree bindings.
Quoted 6 lines
Quoted 2 lines
The bindings should not document the driver, they should document the hardware/interfaces.
I was thinking of adding a custom property adi,gpos = <0 0 0 0>; to configure the general purpose outputs but i am open to any sugestions. What do you think of this approach ?
No need for custom properties... Look at how e.g. adi,adg792a.txt handles the GPOs that are present on adg792g.
Cheers,
Peter