Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add binding for the TMP119

From: Conor Dooley

Date: Fri Jun 05 2026 - 12:16:55 EST


On Fri, Jun 05, 2026 at 03:20:05PM +0100, Jonathan Cameron wrote:
> On Fri, 05 Jun 2026 14:24:45 +0200
> Romain Gantois <romain.gantois@xxxxxxxxxxx> wrote:
>
> > Hi Jonathan,
> >
> > On Friday, 5 June 2026 13:53:32 CEST Jonathan Cameron wrote:
> > > On Fri, 05 Jun 2026 11:01:35 +0200
> > >
> > > Romain Gantois <romain.gantois@xxxxxxxxxxx> wrote:
> > > > The TMP119 has the same register layout as the TMP117, and a better local
> > > > sensor accuracy.
> > >
> > > Sounds like (and the driver changes pretty much confirm) that this could
> > > use a fallback compatible to the tmp117.
> > >
> >
> > What do you mean by "fallback compatible" in this case? Do you mean we should
> > do something like this in the bindings:
> >
> > ```
> > enum:
> > - ti,tmp116
> > - ti,tmp119
> > const:
> > - ti,tmp117
> > ```
> Something like (I can never remember the syntax so this is modified from
> another binding doc and untested)
>
> oneOf:
> - enum:
> - ti,tmp116
> - ti,tmp117
> - items:
> - enum: #enum here because once we have one we tend to get more ;)
> - ti,tmp119
> - const: ti,tmp117

Other than the cheeky comment, this looks okay.

>
> >
> > But wouldn't this invalidate existing device trees which only have:
> >
> > `compatible = "ti,tmp116";`
> >
> > > The second patch then just resolves the print that would happen on older
> > > kernels using that fallback due to ID mismatch. That's fine but nice
> > > if older kernels can work with this part.
> >
> > Sorry I don't quite understand: since this is a feature patch, I don't expect
> > it would get backported onto older kernels. Therefore why would the second
> > patch resolve the print happening on older kernels?
> >
> The point of a fallback compatible is that we don't have to backport anything.
> New device tree comes along that lists
>
> compatible = "ti,tmp119", "ti,tmp117"
>
> will just work. Older kernel will think it has a tmp117 which is fine as they
> are register interface compatible. It will print a message to say that it
> found an unknown ID but then assume it is what the firmware told it, here the
> tmp117 fallback. With your second patch in place, that harmless message will
> disappear for new kernels.
>
> Jonathan
>
>
> > Thanks,
> >
>

Attachment: signature.asc
Description: PGP signature