From: Jonathan Cameron <jic23@kernel.org>
To: Romain Gantois <romain.gantois@bootlin.com>
Cc: "Puranjay Mohan" <puranjay@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Wil Stark" <wil_stark@keysight.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: iio: ti,tmp117: add binding for the TMP119
Date: Fri, 5 Jun 2026 15:20:05 +0100 [thread overview]
Message-ID: <20260605152005.4d888f6b@jic23-huawei> (raw)
In-Reply-To: <ft-705oeTSiaftSGNjv94A@bootlin.com>
On Fri, 05 Jun 2026 14:24:45 +0200
Romain Gantois <romain.gantois@bootlin.com> 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@bootlin.com> 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
>
> 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,
>
next prev parent reply other threads:[~2026-06-05 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 9:01 [PATCH 0/2] iio: temperature: tmp117: Support the TMP119 sensor Romain Gantois
2026-06-05 9:01 ` [PATCH 1/2] dt-bindings: iio: ti,tmp117: add binding for the TMP119 Romain Gantois
2026-06-05 11:53 ` Jonathan Cameron
2026-06-05 12:24 ` Romain Gantois
2026-06-05 14:20 ` Jonathan Cameron [this message]
2026-06-05 16:08 ` Conor Dooley
2026-06-08 15:05 ` Romain Gantois
2026-06-05 9:01 ` [PATCH 2/2] iio: temperature: tmp117: add TI TMP119 support Romain Gantois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260605152005.4d888f6b@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=puranjay@kernel.org \
--cc=robh@kernel.org \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=wil_stark@keysight.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®