[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251128-heftiness-viability-4208bceffb89@spud>
Date: Fri, 28 Nov 2025 18:53:15 +0000
From: Conor Dooley <conor@...nel.org>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] dt-bindings: switch: adg1712: add ADG1712 SPST
switch binding
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@...log.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@...log.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
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists