Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] mux: gpio: add support for ADG1712 quad SPST switch
@ 2025-11-21 11:57 Antoniu Miclaus
  2025-11-21 11:57 ` [PATCH 1/2] dt-bindings: mux: gpio-mux: add support for ADG1712 Antoniu Miclaus
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Antoniu Miclaus @ 2025-11-21 11:57 UTC (permalink / raw)
  To: Peter Rosin, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Linus Walleij, Bartosz Golaszewski, Antoniu Miclaus,
	Srinivas Kandagatla, David Lechner, devicetree, linux-kernel,
	linux-gpio

This series adds support for the Analog Devices ADG1712 quad single-pole/
single-throw (SPST) switch to the existing GPIO multiplexer driver.

The ADG1712 contains four independent switches, each controlled by a
dedicated GPIO pin. Unlike traditional multiplexers that use GPIOs as
binary-encoded selectors, the ADG1712 treats each GPIO as a direct switch
controller.

However, the existing gpio-mux driver architecture handles this perfectly
by treating the mux state (0-15) as representing all possible combinations
of the four independent switches. The existing mux_gpio_set() function uses
gpiod_multi_set_value_cansleep() which treats the state as a bitmap,
setting each GPIO according to the corresponding bit position.

For example:
- State 0 (0000): All switches OFF
- State 5 (0101): SW1=ON, SW2=OFF, SW3=ON, SW4=OFF
- State 15 (1111): All switches ON

This approach allows the ADG1712 to leverage the existing mux framework
for switch control while reusing all existing gpio-mux infrastructure
without any code changes beyond adding the compatible string.

Patch 1 updates the device tree bindings to support the ADG1712 compatible
string and includes documentation and examples.

Patch 2 adds the minimal driver support by adding the ADG1712 compatible
string to the existing gpio-mux driver.

Antoniu Miclaus (2):
  dt-bindings: mux: gpio-mux: add support for ADG1712
  mux: gpio: add support for ADG1712 quad SPST switch

 .../devicetree/bindings/mux/gpio-mux.yaml     | 24 ++++++++++++++++++-
 drivers/mux/gpio.c                            |  1 +
 2 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-11-26 14:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21 11:57 [PATCH 0/2] mux: gpio: add support for ADG1712 quad SPST switch Antoniu Miclaus
2025-11-21 11:57 ` [PATCH 1/2] dt-bindings: mux: gpio-mux: add support for ADG1712 Antoniu Miclaus
2025-11-21 13:44   ` Rob Herring (Arm)
2025-11-21 18:25     ` Conor Dooley
2025-11-21 11:57 ` [PATCH 2/2] mux: gpio: add support for ADG1712 quad SPST switch Antoniu Miclaus
2025-11-21 14:30 ` [PATCH 0/2] " David Lechner
2025-11-21 22:54 ` Peter Rosin
2025-11-26 14:44   ` Miclaus, Antoniu

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