2024-01-11 16:32:05

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] dt-bindings: iio: hmc425a: add conditional GPIO array size constraints

On Thu, Jan 11, 2024 at 10:17:58AM +0200, Ceclan Dumitru wrote:
>
>
> On 1/10/24 18:17, Conor Dooley wrote:
> > On Wed, Jan 10, 2024 at 05:37:09PM +0200, Dumitru Ceclan wrote:...
> >> ctrl-gpios:
> >> description:
> >> - Must contain an array of 6 GPIO specifiers, referring to the GPIO pins
> >> - connected to the control pins V1-V6.
> >> - minItems: 6
> >> + Must contain an array of GPIO specifiers, referring to the GPIO pins
> >> + connected to the control pins.
> >> + ADRF5740 - 4 GPIO connected to D2-D5
> >> + HMC540S - 4 GPIO connected to V1-V4
> >> + HMC425A - 6 GPIO connected to V1-V6
> >> + minItems: 1
> >> maxItems: 6
> >>
> >> +allOf:
> >> + - if:
> >> + properties:
> >> + compatible:
> >> + contains:
> >> + const: adi,hmc425a
> >> + then:
> >> + properties:
> >> + ctrl-gpios:
> >> + minItems: 6
> >
> >> + maxItems: 6
> >
> > This one should not be needed, it's already set by constraints on the
> > property above.
> >
>
> No, not needed, just inspired from:
> /bindings/clock/samsung,exynos7-clock.yaml
>
> Specifically, the top constraints:
> clocks:
>
> minItems: 1
>
> maxItems: 13
>
> One of the conditional constraints:
> clocks:
>
> minItems: 13
>
> maxItems: 13
>
>
> I would only have two arguments for this staying here:
> - It stays consistent with other cases
> - In the case a new device with more than 6 GPIOs is added, this would
> need to be put back in

Okay.


Attachments:
(No filename) (1.59 kB)
signature.asc (235.00 B)
Download all attachments

2024-01-11 16:33:20

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v2 1/4] dt-bindings: iio: hmc425a: add conditional GPIO array size constraints

On Thu, Jan 11, 2024 at 04:31:40PM +0000, Conor Dooley wrote:
> On Thu, Jan 11, 2024 at 10:17:58AM +0200, Ceclan Dumitru wrote:
> >
> >
> > On 1/10/24 18:17, Conor Dooley wrote:
> > > On Wed, Jan 10, 2024 at 05:37:09PM +0200, Dumitru Ceclan wrote:...
> > >> ctrl-gpios:
> > >> description:
> > >> - Must contain an array of 6 GPIO specifiers, referring to the GPIO pins
> > >> - connected to the control pins V1-V6.
> > >> - minItems: 6
> > >> + Must contain an array of GPIO specifiers, referring to the GPIO pins
> > >> + connected to the control pins.
> > >> + ADRF5740 - 4 GPIO connected to D2-D5
> > >> + HMC540S - 4 GPIO connected to V1-V4
> > >> + HMC425A - 6 GPIO connected to V1-V6
> > >> + minItems: 1
> > >> maxItems: 6
> > >>
> > >> +allOf:
> > >> + - if:
> > >> + properties:
> > >> + compatible:
> > >> + contains:
> > >> + const: adi,hmc425a
> > >> + then:
> > >> + properties:
> > >> + ctrl-gpios:
> > >> + minItems: 6
> > >
> > >> + maxItems: 6
> > >
> > > This one should not be needed, it's already set by constraints on the
> > > property above.
> > >
> >
> > No, not needed, just inspired from:
> > /bindings/clock/samsung,exynos7-clock.yaml
> >
> > Specifically, the top constraints:
> > clocks:
> >
> > minItems: 1
> >
> > maxItems: 13
> >
> > One of the conditional constraints:
> > clocks:
> >
> > minItems: 13
> >
> > maxItems: 13
> >
> >
> > I would only have two arguments for this staying here:
> > - It stays consistent with other cases
> > - In the case a new device with more than 6 GPIOs is added, this would
> > need to be put back in
>
> Okay.

Sorry, that's probably super unclear. I meant it's okay to leave it.


Attachments:
(No filename) (1.84 kB)
signature.asc (235.00 B)
Download all attachments