Re: [PATCH v3 2/2] gpio: adg1712: add driver support
From: Linus Walleij
Date: Wed Nov 19 2025 - 09:00:03 EST
On Mon, Nov 17, 2025 at 10:15 AM Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx> wrote:
> Add driver support for the ADG1712, which contains four independent
> single-pole/single-throw (SPST) switches and 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.
>
> The driver configures switches once at probe time based on device tree
> properties and does not expose any userspace interface for runtime control.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> ---
> Changes in v3:
> - Remove GPIO controller interface
> - Configure switches from device tree at probe time only
> - Add 'switch-states' property parsing
> - Change from GPIOD_ASIS to GPIOD_OUT_LOW
If you do it this way, as Bartosz says this is not a GPIO driver anymore.
Create drivers/switch and discuss with Greg how to proceed with the new
subsystem if you want to take this approach (and maybe eventually
create a userspace ABI).
What I've said about using the GPIO subsystem for this (which may be
OK if there is some consensus around it) can be found here:
https://lore.kernel.org/linux-gpio/CACRpkdZf9D2PH5AR46Pwi8UoyfwumKS4P3ncJ=RN4iu_cJzZ5w@xxxxxxxxxxxxxx/
and here:
https://lore.kernel.org/linux-gpio/CACRpkdbZgxWaf7B7vwD3n-OSbt8h8vGKQ_CmB_SNjDG6aXHayA@xxxxxxxxxxxxxx/
Yours,
Linus Walleij