Re: [PATCH v3 1/2] dt-bindings: switch: adg1712: add adg1712 support
From: Conor Dooley
Date: Wed Nov 19 2025 - 19:31:15 EST
On Wed, Nov 19, 2025 at 10:22:02PM +0100, Linus Walleij wrote:
> On Wed, Nov 19, 2025 at 6:56 PM Conor Dooley <conor@xxxxxxxxxx> wrote:
> > On Mon, Nov 17, 2025 at 09:13:22AM +0000, Antoniu Miclaus wrote:
>
> > > + switch-gpios:
> > > + description: |
> > > + Array of GPIOs connected to the IN1-IN4 control pins.
> > > + Index 0 corresponds to IN1 (controls SW1),
> > > + Index 1 corresponds to IN2 (controls SW2),
> > > + Index 2 corresponds to IN3 (controls SW3),
> > > + Index 3 corresponds to IN4 (controls SW4).
> >
> > Did I miss a reply about my comment on this switch-gpios? I was asking
> > if a binding like this, which doesn't permit any of these not being
> > provided is a good idea.
> >
> > > + minItems: 4
> > > + maxItems: 4
>
> Maybe we should make them named GPIOs after all, as the switch
> has exactly 4 possible GPIOs. It was my request to have an
> array I think, and now I feel a bit stupid about that :(
It might cause havoc dt-schema wise, but is having a switch-gpio-names
a silly suggestion? Seems more usable than having 16 or 32 individual
-gpios properties on a larger device.
> > > + switch-states:
> > > + description: |
> > > + Initial states for the four switches (SW1-SW4).
> >
> > Missing an adi prefix? Also, probably should say initial if it is
> > initial states.
>
> It should probably be initial-switch-states.
>
> I vote for a generic binding as it is a new "subsystem" in DT,
> and this can be exepected for any new switch.
Cool, prefix-less is fine in the case - although Rob's usual requirement
is two users for some common thing to make sure that it is actually
suitable for being common.
Attachment:
signature.asc
Description: PGP signature