[PATCH 2/2] mux: gpio: add support for ADG1712 quad SPST switch

Antoniu Miclaus posted 2 patches 1 week, 3 days ago
[PATCH 2/2] mux: gpio: add support for ADG1712 quad SPST switch
Posted by Antoniu Miclaus 1 week, 3 days ago
Add support for the Analog Devices ADG1712 quad single-pole/
single-throw (SPST) switch to the existing GPIO multiplexer driver.

The existing gpio-mux driver architecture handles this properly.
The mux state (0-15) represents all possible combinations of the four
independent switches.

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

This integration allows 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.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/mux/gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mux/gpio.c b/drivers/mux/gpio.c
index 4cc3202c58f3..b363ad5a605b 100644
--- a/drivers/mux/gpio.c
+++ b/drivers/mux/gpio.c
@@ -40,6 +40,7 @@ static const struct mux_control_ops mux_gpio_ops = {
 
 static const struct of_device_id mux_gpio_dt_ids[] = {
 	{ .compatible = "gpio-mux", },
+	{ .compatible = "adi,adg1712", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mux_gpio_dt_ids);
-- 
2.43.0