* [PATCH V3 1/2] dt-bindings: mux: add adi,adgs1408
@ 2018-07-19 13:43 Mircea Caprioru
2018-07-19 15:05 ` Peter Rosin
0 siblings, 1 reply; 2+ messages in thread
From: Mircea Caprioru @ 2018-07-19 13:43 UTC (permalink / raw)
To: peda, robh+dt
Cc: davem, mchehab+samsung, akpm, rdunlap, devicetree,
Mircea Caprioru
Adding 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 <mircea.caprioru@analog.com>
---
Changelog V2 -> V3
- formated dt-bindings commit message
- added property for general purpose outputs
.../devicetree/bindings/mux/adi,adgs1408.txt | 48 +++++++++++++++++++
MAINTAINERS | 6 +++
2 files changed, 54 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mux/adi,adgs1408.txt
diff --git a/Documentation/devicetree/bindings/mux/adi,adgs1408.txt b/Documentation/devicetree/bindings/mux/adi,adgs1408.txt
new file mode 100644
index 000000000000..0a7b67023ef0
--- /dev/null
+++ b/Documentation/devicetree/bindings/mux/adi,adgs1408.txt
@@ -0,0 +1,48 @@
+Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux
+
+Required properties:
+- compatible : Should be one of
+ * "adi,adgs1408"
+ * "adi,adgs1409"
+* Standard mux-controller bindings as described in mux-controller.txt
+
+Optional properties for ADGS1408/1409:
+- gpio-controller : if present, #gpio-cells is required.
+- #gpio-cells : should be <2>
+ - First cell is the GPO line number, i.e. 0 or 1
+ - Second cell is used to specify active high (0)
+ or active low (1)
+
+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 state set to idle as is (no idle-state declared)
+ */
+ &spi0 {
+ mux: mux-controller@0 {
+ compatible = "adi,adgs1408";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ #mux-control-cells = <0>;
+ };
+ }
+
+ adc-mux {
+ 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";
+
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 192d7f73fd01..55dfdbf835c1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -810,6 +810,12 @@ L: linux-media@vger.kernel.org
S: Maintained
F: drivers/media/i2c/ad9389b*
+ANALOG DEVICES INC ADGS1408 DRIVER
+M: Mircea Caprioru <mircea.caprioru@analog.com>
+S: Supported
+F: drivers/mux/adgs1408.c
+F: Documentation/devicetree/bindings/mux/adgs1408.txt
+
ANALOG DEVICES INC ADV7180 DRIVER
M: Lars-Peter Clausen <lars@metafoo.de>
L: linux-media@vger.kernel.org
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V3 1/2] dt-bindings: mux: add adi,adgs1408
2018-07-19 13:43 [PATCH V3 1/2] dt-bindings: mux: add adi,adgs1408 Mircea Caprioru
@ 2018-07-19 15:05 ` Peter Rosin
0 siblings, 0 replies; 2+ messages in thread
From: Peter Rosin @ 2018-07-19 15:05 UTC (permalink / raw)
To: Mircea Caprioru, robh+dt
Cc: davem, mchehab+samsung, akpm, rdunlap, devicetree
On 2018-07-19 15:43, Mircea Caprioru wrote:
> Adding 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 <mircea.caprioru@analog.com>
> ---
> Changelog V2 -> V3
> - formated dt-bindings commit message
> - added property for general purpose outputs
>
> .../devicetree/bindings/mux/adi,adgs1408.txt | 48 +++++++++++++++++++
> MAINTAINERS | 6 +++
> 2 files changed, 54 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mux/adi,adgs1408.txt
>
> diff --git a/Documentation/devicetree/bindings/mux/adi,adgs1408.txt b/Documentation/devicetree/bindings/mux/adi,adgs1408.txt
> new file mode 100644
> index 000000000000..0a7b67023ef0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mux/adi,adgs1408.txt
> @@ -0,0 +1,48 @@
> +Bindings for Analog Devices ADGS1408/1409 8:1/Dual 4:1 Mux
> +
> +Required properties:
> +- compatible : Should be one of
> + * "adi,adgs1408"
> + * "adi,adgs1409"
> +* Standard mux-controller bindings as described in mux-controller.txt
> +
> +Optional properties for ADGS1408/1409:
> +- gpio-controller : if present, #gpio-cells is required.
> +- #gpio-cells : should be <2>
> + - First cell is the GPO line number, i.e. 0 or 1
ADGS1408 has four GPOs, and it's five for 1409. So, you should adjust
the "0 or 1" copy-paste from the adg792a origin (which has two GPOs).
Cheers,
Peter
> + - Second cell is used to specify active high (0)
> + or active low (1)
> +
> +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 state set to idle as is (no idle-state declared)
> + */
> + &spi0 {
> + mux: mux-controller@0 {
> + compatible = "adi,adgs1408";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + #mux-control-cells = <0>;
> + };
> + }
> +
> + adc-mux {
> + 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";
> +
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 192d7f73fd01..55dfdbf835c1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -810,6 +810,12 @@ L: linux-media@vger.kernel.org
> S: Maintained
> F: drivers/media/i2c/ad9389b*
>
> +ANALOG DEVICES INC ADGS1408 DRIVER
> +M: Mircea Caprioru <mircea.caprioru@analog.com>
> +S: Supported
> +F: drivers/mux/adgs1408.c
> +F: Documentation/devicetree/bindings/mux/adgs1408.txt
> +
> ANALOG DEVICES INC ADV7180 DRIVER
> M: Lars-Peter Clausen <lars@metafoo.de>
> L: linux-media@vger.kernel.org
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-19 15:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 13:43 [PATCH V3 1/2] dt-bindings: mux: add adi,adgs1408 Mircea Caprioru
2018-07-19 15:05 ` Peter Rosin
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).