Re: [PATCH 1/2] dt-bindings: iio: light: Avago APDS9306
From: Jonathan Cameron
Date: Tue Oct 10 2023 - 10:49:34 EST
On Tue, 10 Oct 2023 22:48:43 +1030
Subhajit Ghosh <subhajit.ghosh@xxxxxxxxxxxxxx> wrote:
> On 10/10/23 19:22, Matti Vaittinen wrote:
>
> >> +properties:
> >> + compatible:
> >> + const: avago,apds9306
> >
> > I see the driver supports two different variants of this IC, differentiated by the part-ID register. Variants are named as apds9306 and apds9306-065. I wonder if we could/should have different compatibles for them?
> >
>
> Yes, we can. It makes sense. I'll implement that.
We could. The reason to do so is that we might in future want to use
fallback compatibles. So we want to allow a new DT to work with older
kernel by saying - I have a new device, but it is fully compatible with
this earlier one. In those cases we check the ID as your driver current
does, but just print a warning that we aren't sure what the device is so
are going with what the DT told us to fall back to.
Jonathan
>
> Regards,
> Subhajit Ghosh
>