Re: [PATCH 1/2] dt-bindings: iio: light: Add APDS9160 binding
From: Jonathan Cameron
Date: Sun Nov 24 2024 - 14:26:33 EST
On Wed, 20 Nov 2024 18:22:43 +0100
Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
> On 19/11/2024 21:36, Mikael Gonella-Bolduc via B4 Relay wrote:
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + vdd-supply: true
> > +
> > +additionalProperties: false
>
> This goes after required:
>
> > +
> > +required:
> > + - compatible
> > + - reg
>
> Supply not required?
Just for background on this. Linux will happily provide
you a stub regulator if the supply is not in dt, but we decided a while ago
that it was more accurate to have the supplies as required properties as that
would allow us to distinguish between those that are needed for operation
and those that are actually optional like reference voltages where there
is the option of an on chip reference if the external one isn't connected.
So almost certainly just make it required here.
Jonathan
>
> > +
> > +examples:
> > + - |
> > + #include <dt-bindings/interrupt-controller/irq.h>
> > +
> > + i2c {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + apds9160@53 {
>
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
>
>
> > + compatible = "broadmobi,apds9160";
>
> Use 4 spaces for example indentation. Or at least something consistent.
>
>
> Best regards,
> Krzysztof
>