Devicetree
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] dt-bindings: switch: adg1712: add ADG1712 SPST switch binding
Date: Fri, 28 Nov 2025 18:53:15 +0000	[thread overview]
Message-ID: <20251128-heftiness-viability-4208bceffb89@spud> (raw)
In-Reply-To: <20251128144627.24910-2-antoniu.miclaus@analog.com>

[-- 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 --]

      parent reply	other threads:[~2025-11-28 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251128-heftiness-viability-4208bceffb89@spud \
    --to=conor@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox