From: "Alvin Šipraga" <alvin.sipraga@analog.com>
To: Tapio Reijonen <tapio.reijonen@vaisala.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Rosin <peda@lysator.liu.se>, 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,
Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v5 1/2] dt-bindings: mux: gpio-mux: Add enable-gpios
Date: Thu, 5 Nov 2026 13:57:15 +0100 [thread overview]
Message-ID: <aux9I60mqmfwkDqM@analog.com> (raw)
In-Reply-To: <20261105-add-external-mux-enable-gpio-v5-1-96c5b62c86ea@vaisala.com>
On Thu, Nov 05, 2026 at 10:11:04AM +0000, Tapio Reijonen wrote:
> Analog multiplexers have an enable input besides the address inputs. On a
> 74HC4051 it is the E input: with E high, all eight switches are in the
> high-impedance off state, independent of S0 to S2. A 74HC4067 works the
> same way with four address inputs.
>
> Two things need that input. The mux-controller binding describes an idle
> state of disconnect, which a gpio-mux cannot reach today because the
> address inputs always select a channel. And the address inputs are plain
> gpios that may live on different gpio controllers, so they are not
> updated in one go and the mux passes through the intermediate addresses
> on every channel change unless it is disabled meanwhile.
>
> Add enable-gpios to describe the enable input, and require it for an idle
> state of disconnect.
>
> Signed-off-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> .../devicetree/bindings/mux/gpio-mux.yaml | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> index ef7e33ec85d479ce57c5fe4a780f81a08a6ab6ba..2dd94704fd7bde238af4e84af87c2ad8e955eb14 100644
> --- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> +++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml
> @@ -29,6 +29,14 @@ properties:
> description:
> Regulator to power on the multiplexer.
>
> + enable-gpios:
> + maxItems: 1
> + description:
> + Enable input of the multiplexer, which disconnects all channels when
> + deasserted, independent of mux-gpios. Deasserted while the mux-gpios
> + are updated and for an idle state of disconnect, which cannot be
> + reached with the mux-gpios alone and thus requires this gpio.
> +
> '#mux-control-cells':
> enum: [ 0, 1 ]
>
> @@ -47,11 +55,23 @@ anyOf:
> - required:
> - "#mux-state-cells"
>
> +allOf:
> + - if:
> + properties:
> + idle-state:
> + const: -2
> + required:
> + - idle-state
> + then:
> + required:
> + - enable-gpios
> +
> additionalProperties: false
>
> examples:
> - |
> #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/mux/mux.h>
>
> mux: mux-controller {
> compatible = "gpio-mux";
> @@ -59,6 +79,8 @@ examples:
>
> mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>,
> <&pioA 1 GPIO_ACTIVE_HIGH>;
> + enable-gpios = <&pioA 2 GPIO_ACTIVE_LOW>;
> + idle-state = <MUX_IDLE_DISCONNECT>;
> };
>
> adc-mux {
>
> --
> 2.47.3
>
next prev parent reply other threads:[~2026-11-05 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 10:11 [PATCH v5 0/2] mux: gpio: Add optional enable gpio Tapio Reijonen
2026-11-05 10:11 ` [PATCH v5 1/2] dt-bindings: mux: gpio-mux: Add enable-gpios Tapio Reijonen
2026-11-05 12:57 ` Alvin Šipraga [this message]
2026-11-05 10:11 ` [PATCH v5 2/2] mux: gpio: Add optional enable gpio Tapio Reijonen
2026-11-05 12:57 ` Alvin Šipraga
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=aux9I60mqmfwkDqM@analog.com \
--to=alvin.sipraga@analog.com \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@lysator.liu.se \
--cc=robh@kernel.org \
--cc=tapio.reijonen@vaisala.com \
/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