Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/1] dt-bindings: switch: add ADG1712 SPST switch binding
@ 2025-11-28 14:46 Antoniu Miclaus
  2025-11-28 14:46 ` [PATCH 1/1] dt-bindings: switch: adg1712: " Antoniu Miclaus
  0 siblings, 1 reply; 4+ messages in thread
From: Antoniu Miclaus @ 2025-11-28 14:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Antoniu Miclaus,
	devicetree, linux-kernel

This series adds devicetree bindings documentation for the Analog Devices
ADG1712 quad SPST switch. The ADG1712 contains four independent single-pole,
single-throw (SPST) switches, each controlled by a dedicated GPIO pin.

While the device uses the existing gpio-mux driver infrastructure, a
dedicated binding document provides clear documentation on how to properly
represent the ADG1712 in devicetree, following the pattern of one
mux-controller node per independent switch.

Antoniu Miclaus (1):
  dt-bindings: switch: adg1712: add ADG1712 SPST switch binding

 .../bindings/switch/adi,adg1712.yaml          | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/switch/adi,adg1712.yaml

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] dt-bindings: switch: adg1712: add ADG1712 SPST switch binding
  2025-11-28 14:46 [PATCH 0/1] dt-bindings: switch: add ADG1712 SPST switch binding Antoniu Miclaus
@ 2025-11-28 14:46 ` Antoniu Miclaus
  2025-11-28 16:19   ` Rob Herring (Arm)
  2025-11-28 18:53   ` Conor Dooley
  0 siblings, 2 replies; 4+ messages in thread
From: Antoniu Miclaus @ 2025-11-28 14:46 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Antoniu Miclaus,
	devicetree, linux-kernel

Add devicetree bindings for the ADG1712 quad SPST switch.

The ADG1712 contains four independent single-pole, single-throw (SPST)
switches, each controlled by a dedicated GPIO pin. While the device
uses the existing gpio-mux driver infrastructure (as each switch can be
modeled as a simple 2-state mux), a dedicated binding document is needed
to provide clear documentation on how to properly represent the ADG1712
in devicetree, following the pattern of one mux-controller node per
independent switch.

The binding references the gpio-mux schema and demonstrates how each of
the four independent switches should be instantiated as separate
mux-controller nodes in the devicetree.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 .../bindings/switch/adi,adg1712.yaml          | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/switch/adi,adg1712.yaml

diff --git a/Documentation/devicetree/bindings/switch/adi,adg1712.yaml b/Documentation/devicetree/bindings/switch/adi,adg1712.yaml
new file mode 100644
index 000000000000..7de9ec1b7447
--- /dev/null
+++ b/Documentation/devicetree/bindings/switch/adi,adg1712.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/switch/adi,adg1712.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices ADG1712 quad SPST switch
+
+maintainers:
+  - Antoniu Miclaus <antoniu.miclaus@analog.com>
+
+description: |
+  The ADG1712 contains four independent single-pole, single-throw (SPST)
+  switches controlled by GPIO pins. The device operates with a low-voltage
+  single supply range from +1.08V to +5.5V or a low-voltage dual supply
+  range from ±1.08V to ±2.75V.
+
+  Datasheet: https://www.analog.com/en/products/adg1712.html
+
+select: false
+
+allOf:
+  - $ref: /schemas/mux/gpio-mux.yaml#
+
+properties:
+  compatible:
+    const: gpio-mux
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    /* ADG1712 with four independent switches, each as a 2-state mux */
+    adg1712_sw1: mux-controller-0 {
+        compatible = "gpio-mux";
+        #mux-control-cells = <0>;
+        mux-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
+        idle-state = <0>;  /* Switch open */
+    };
+
+    adg1712_sw2: mux-controller-1 {
+        compatible = "gpio-mux";
+        #mux-control-cells = <0>;
+        mux-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+        idle-state = <0>;  /* Switch open */
+    };
+
+    adg1712_sw3: mux-controller-2 {
+        compatible = "gpio-mux";
+        #mux-control-cells = <0>;
+        mux-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+        idle-state = <1>;  /* Switch closed */
+    };
+
+    adg1712_sw4: mux-controller-3 {
+        compatible = "gpio-mux";
+        #mux-control-cells = <0>;
+        mux-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+        idle-state = <0>;  /* Switch open */
+    };
+...
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] dt-bindings: switch: adg1712: add ADG1712 SPST switch binding
  2025-11-28 14:46 ` [PATCH 1/1] dt-bindings: switch: adg1712: " Antoniu Miclaus
@ 2025-11-28 16:19   ` Rob Herring (Arm)
  2025-11-28 18:53   ` Conor Dooley
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2025-11-28 16:19 UTC (permalink / raw)
  To: Antoniu Miclaus
  Cc: Conor Dooley, devicetree, linux-kernel, Krzysztof Kozlowski


On Fri, 28 Nov 2025 16:46:13 +0200, Antoniu Miclaus wrote:
> Add devicetree bindings for the ADG1712 quad SPST switch.
> 
> The ADG1712 contains four independent single-pole, single-throw (SPST)
> switches, each controlled by a dedicated GPIO pin. While the device
> uses the existing gpio-mux driver infrastructure (as each switch can be
> modeled as a simple 2-state mux), a dedicated binding document is needed
> to provide clear documentation on how to properly represent the ADG1712
> in devicetree, following the pattern of one mux-controller node per
> independent switch.
> 
> The binding references the gpio-mux schema and demonstrates how each of
> the four independent switches should be instantiated as separate
> mux-controller nodes in the devicetree.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
>  .../bindings/switch/adi,adg1712.yaml          | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/switch/adi,adg1712.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-zones.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c263000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']
Documentation/devicetree/bindings/thermal/thermal-sensor.example.dtb: /example-0/soc/thermal-sensor@c265000: failed to match any schema with compatible: ['qcom,sdm845-tsens', 'qcom,tsens-v2']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20251128144627.24910-2-antoniu.miclaus@analog.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] dt-bindings: switch: adg1712: add ADG1712 SPST switch binding
  2025-11-28 14:46 ` [PATCH 1/1] dt-bindings: switch: adg1712: " Antoniu Miclaus
  2025-11-28 16:19   ` Rob Herring (Arm)
@ 2025-11-28 18:53   ` Conor Dooley
  1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2025-11-28 18:53 UTC (permalink / raw)
  To: Antoniu Miclaus
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3647 bytes --]

On Fri, Nov 28, 2025 at 04:46:13PM +0200, Antoniu Miclaus wrote:
> Add devicetree bindings for the ADG1712 quad SPST switch.
> 
> The ADG1712 contains four independent single-pole, single-throw (SPST)
> switches, each controlled by a dedicated GPIO pin. While the device
> uses the existing gpio-mux driver infrastructure (as each switch can be
> modeled as a simple 2-state mux), a dedicated binding document is needed
> to provide clear documentation on how to properly represent the ADG1712
> in devicetree, following the pattern of one mux-controller node per
> independent switch.
> 
> The binding references the gpio-mux schema and demonstrates how each of
> the four independent switches should be instantiated as separate
> mux-controller nodes in the devicetree.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> ---
>  .../bindings/switch/adi,adg1712.yaml          | 63 +++++++++++++++++++
>  1 file changed, 63 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/switch/adi,adg1712.yaml
> 
> diff --git a/Documentation/devicetree/bindings/switch/adi,adg1712.yaml b/Documentation/devicetree/bindings/switch/adi,adg1712.yaml
> new file mode 100644
> index 000000000000..7de9ec1b7447
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/switch/adi,adg1712.yaml
> @@ -0,0 +1,63 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/switch/adi,adg1712.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices ADG1712 quad SPST switch
> +
> +maintainers:
> +  - Antoniu Miclaus <antoniu.miclaus@analog.com>
> +
> +description: |
> +  The ADG1712 contains four independent single-pole, single-throw (SPST)
> +  switches controlled by GPIO pins. The device operates with a low-voltage
> +  single supply range from +1.08V to +5.5V or a low-voltage dual supply
> +  range from ±1.08V to ±2.75V.
> +
> +  Datasheet: https://www.analog.com/en/products/adg1712.html
> +
> +select: false

I think this pretty clearly demonstrates that the binding is not
correct.
If these are independent switches as part of one device, they should
probably be represented as child nodes of a node with an adg1712
compatible, similar to how adc channels etc are done.

pw-bot: changes-requested

> +
> +allOf:
> +  - $ref: /schemas/mux/gpio-mux.yaml#
> +
> +properties:
> +  compatible:
> +    const: gpio-mux
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    /* ADG1712 with four independent switches, each as a 2-state mux */
> +    adg1712_sw1: mux-controller-0 {
> +        compatible = "gpio-mux";
> +        #mux-control-cells = <0>;
> +        mux-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
> +        idle-state = <0>;  /* Switch open */
> +    };
> +
> +    adg1712_sw2: mux-controller-1 {
> +        compatible = "gpio-mux";
> +        #mux-control-cells = <0>;
> +        mux-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
> +        idle-state = <0>;  /* Switch open */
> +    };
> +
> +    adg1712_sw3: mux-controller-2 {
> +        compatible = "gpio-mux";
> +        #mux-control-cells = <0>;
> +        mux-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
> +        idle-state = <1>;  /* Switch closed */
> +    };
> +
> +    adg1712_sw4: mux-controller-3 {
> +        compatible = "gpio-mux";
> +        #mux-control-cells = <0>;
> +        mux-gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
> +        idle-state = <0>;  /* Switch open */
> +    };
> +...
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-28 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-28 14:46 [PATCH 0/1] dt-bindings: switch: add ADG1712 SPST switch binding Antoniu Miclaus
2025-11-28 14:46 ` [PATCH 1/1] dt-bindings: switch: adg1712: " Antoniu Miclaus
2025-11-28 16:19   ` Rob Herring (Arm)
2025-11-28 18:53   ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox