2024-02-20 18:52:52

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH v13 1/3] dt-bindings: adc: add AD7173

On Tue, Feb 20, 2024 at 11:43:38AM +0200, Dumitru Ceclan wrote:

> + interrupts:
> + minItems: 1
> + description: |

> +
> + interrupt-names:
> + minItems: 1
> + items:
> + - const: rdy
> + - const: err

I noticed that for minItems == 1, the rdy interrupt is required and err
is the optional one.

With that in mind, you can simplify the interrupts description so that
it describes the interrupts separately:

interrupts:
minItems:
items:
- description:
Ready: multiplexed with SPI data out. While SPI CS is low,
can be used to indicate the completion of a conversion.

- description:
Error: The three error bits in the status register (ADC_ERROR, CRC_ERROR,
and REG_ERROR) are OR'ed, inverted, and mapped to the ERROR pin. Therefore,
the ERROR pin indicates that an error has occurred.

Otherwise, I think everything has been sorted out?

Reviewed-by: Conor Dooley <[email protected]>

Cheers,
Conor.


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

2024-02-24 18:30:26

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v13 1/3] dt-bindings: adc: add AD7173

On Tue, 20 Feb 2024 18:52:37 +0000
Conor Dooley <[email protected]> wrote:

> On Tue, Feb 20, 2024 at 11:43:38AM +0200, Dumitru Ceclan wrote:
>
> > + interrupts:
> > + minItems: 1
> > + description: |
>
> > +
> > + interrupt-names:
> > + minItems: 1
> > + items:
> > + - const: rdy
> > + - const: err
>
> I noticed that for minItems == 1, the rdy interrupt is required and err
> is the optional one.
>
> With that in mind, you can simplify the interrupts description so that
> it describes the interrupts separately:
>
> interrupts:
> minItems:
> items:
> - description:
> Ready: multiplexed with SPI data out. While SPI CS is low,
> can be used to indicate the completion of a conversion.
>
> - description:
> Error: The three error bits in the status register (ADC_ERROR, CRC_ERROR,
> and REG_ERROR) are OR'ed, inverted, and mapped to the ERROR pin. Therefore,
> the ERROR pin indicates that an error has occurred.
>
> Otherwise, I think everything has been sorted out?
>
> Reviewed-by: Conor Dooley <[email protected]>

This ordering may bite us in the future. Someone will build a board
with err as only one wired. But meh, it will be a binding relaxation needed
so I'm not that bothered by that.
>
> Cheers,
> Conor.