linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
@ 2025-09-15 17:08 Flaviu Nistor
  2025-09-15 17:08 ` [PATCH 2/2] hwmon: tmp102: Add support for " Flaviu Nistor
  2025-09-15 17:18 ` [PATCH 1/2] dt-bindings: hwmon: tmp102: Add " Conor Dooley
  0 siblings, 2 replies; 8+ messages in thread
From: Flaviu Nistor @ 2025-09-15 17:08 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-hwmon, devicetree, linux-kernel, Flaviu Nistor

Add a compatible string for TMP110 and TMP113 devices.

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
---
 Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
index 96b2e4969f78..840b5306a8cf 100644
--- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
+++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
@@ -13,6 +13,8 @@ properties:
   compatible:
     enum:
       - ti,tmp102
+      - ti,tmp110
+      - ti,tmp113
 
   interrupts:
     maxItems: 1
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] hwmon: tmp102: Add support for TMP110 and TMP113 devices
  2025-09-15 17:08 [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices Flaviu Nistor
@ 2025-09-15 17:08 ` Flaviu Nistor
  2025-09-15 17:18 ` [PATCH 1/2] dt-bindings: hwmon: tmp102: Add " Conor Dooley
  1 sibling, 0 replies; 8+ messages in thread
From: Flaviu Nistor @ 2025-09-15 17:08 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-hwmon, devicetree, linux-kernel, Flaviu Nistor

TMP110 and TMP113 temperature sensors are software compatible
with TMP102 sensor but have different accuracy (maximum error).

Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
---
 Documentation/hwmon/tmp102.rst | 21 +++++++++++++++++++++
 drivers/hwmon/Kconfig          |  4 ++--
 drivers/hwmon/tmp102.c         |  4 ++++
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/Documentation/hwmon/tmp102.rst b/Documentation/hwmon/tmp102.rst
index b1f585531a88..3c2cb5bab1e9 100644
--- a/Documentation/hwmon/tmp102.rst
+++ b/Documentation/hwmon/tmp102.rst
@@ -11,6 +11,22 @@ Supported chips:
 
     Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp102.html
 
+  * Texas Instruments TMP110
+
+    Prefix: 'tmp110'
+
+    Addresses scanned: none
+
+    Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp110.html
+
+  * Texas Instruments TMP113
+
+    Prefix: 'tmp113'
+
+    Addresses scanned: none
+
+    Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp113.html
+
 Author:
 
 	Steven King <sfking@fdwdc.com>
@@ -27,5 +43,10 @@ operating temperature has a minimum of -55 C and a maximum of +150 C.
 The TMP102 has a programmable update rate that can select between 8, 4, 1, and
 0.5 Hz. (Currently the driver only supports the default of 4 Hz).
 
+The TMP110 and TMP113 are software compatible with TMP102, but have different
+accuracy (maximum error) specifications. The TMP110 has an accuracy (maximum error)
+of 1.0 degree, TMP113 has an accuracy (maximum error) of 0.3 degree, while TMP102
+has an accuracy (maximum error) of 2.0 degree.
+
 The driver provides the common sysfs-interface for temperatures (see
 Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index d6769288a76e..a5626277c95e 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -2341,8 +2341,8 @@ config SENSORS_TMP102
 	depends on I2C
 	select REGMAP_I2C
 	help
-	  If you say yes here you get support for Texas Instruments TMP102
-	  sensor chips.
+	  If you say yes here you get support for Texas Instruments
+	  TMP102, TMP110, TMP113 sensor chips.
 
 	  This driver can also be built as a module. If so, the module
 	  will be called tmp102.
diff --git a/drivers/hwmon/tmp102.c b/drivers/hwmon/tmp102.c
index 376e0eac8cc1..0df245d220d7 100644
--- a/drivers/hwmon/tmp102.c
+++ b/drivers/hwmon/tmp102.c
@@ -312,12 +312,16 @@ static DEFINE_SIMPLE_DEV_PM_OPS(tmp102_dev_pm_ops, tmp102_suspend, tmp102_resume
 
 static const struct i2c_device_id tmp102_id[] = {
 	{ "tmp102" },
+	{ "tmp110" },
+	{ "tmp113" },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tmp102_id);
 
 static const struct of_device_id __maybe_unused tmp102_of_match[] = {
 	{ .compatible = "ti,tmp102" },
+	{ .compatible = "ti,tmp110" },
+	{ .compatible = "ti,tmp113" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, tmp102_of_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-15 17:08 [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices Flaviu Nistor
  2025-09-15 17:08 ` [PATCH 2/2] hwmon: tmp102: Add support for " Flaviu Nistor
@ 2025-09-15 17:18 ` Conor Dooley
  2025-09-16  6:33   ` Flaviu Nistor
  2025-09-24 15:55   ` Guenter Roeck
  1 sibling, 2 replies; 8+ messages in thread
From: Conor Dooley @ 2025-09-15 17:18 UTC (permalink / raw)
  To: Flaviu Nistor
  Cc: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-hwmon, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
> Add a compatible string for TMP110 and TMP113 devices.
> 
> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
> ---
>  Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> index 96b2e4969f78..840b5306a8cf 100644
> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> @@ -13,6 +13,8 @@ properties:
>    compatible:
>      enum:
>        - ti,tmp102
> +      - ti,tmp110
> +      - ti,tmp113

The driver has no match data and no compatible based decisions added in
your patch. Why is a fallback to tmp102 not suitable?

>  
>    interrupts:
>      maxItems: 1
> -- 
> 2.43.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-15 17:18 ` [PATCH 1/2] dt-bindings: hwmon: tmp102: Add " Conor Dooley
@ 2025-09-16  6:33   ` Flaviu Nistor
  2025-09-22 16:20     ` Rob Herring
  2025-09-24 15:55   ` Guenter Roeck
  1 sibling, 1 reply; 8+ messages in thread
From: Flaviu Nistor @ 2025-09-16  6:33 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-hwmon, devicetree, linux-kernel

On Mon, Sep 15, 2025 at 18:18:51PM +0100, Conor Dooley wrote:

>On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
>> Add a compatible string for TMP110 and TMP113 devices.
>>=20
>> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
>> ---
>>  Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
>>  1 file changed, 2 insertions(+)
>>=20
>> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> index 96b2e4969f78..840b5306a8cf 100644
>> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> @@ -13,6 +13,8 @@ properties:
>>    compatible:
>>      enum:
>>        - ti,tmp102
>> +      - ti,tmp110
>> +      - ti,tmp113
>
>The driver has no match data and no compatible based decisions added in
>your patch. Why is a fallback to tmp102 not suitable?
>
Thanks for the review, it is now more clear to me. You are right, the
fallback to tmp102 can be used. My intentions were to be able to make it
clear in the dts which is the real used sensor on the board but this can
be achieved via the node name (or label). Also I wanted to be able to
find via a quick search in the repo, the info that the sensors are
supported in the kernel, but again, I now realize that updating the
documentation and kconfig should be enough. 

>> =20
>>    interrupts:
>>      maxItems: 1
>> --=20
>> 2.43.0
>>=20

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-16  6:33   ` Flaviu Nistor
@ 2025-09-22 16:20     ` Rob Herring
  0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2025-09-22 16:20 UTC (permalink / raw)
  To: Flaviu Nistor
  Cc: Jean Delvare, Guenter Roeck, Krzysztof Kozlowski, Conor Dooley,
	linux-hwmon, devicetree, linux-kernel

On Tue, Sep 16, 2025 at 09:33:42AM +0300, Flaviu Nistor wrote:
> On Mon, Sep 15, 2025 at 18:18:51PM +0100, Conor Dooley wrote:
> 
> >On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
> >> Add a compatible string for TMP110 and TMP113 devices.
> >>=20
> >> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
> >> ---
> >>  Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>=20
> >> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> >> index 96b2e4969f78..840b5306a8cf 100644
> >> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> >> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> >> @@ -13,6 +13,8 @@ properties:
> >>    compatible:
> >>      enum:
> >>        - ti,tmp102
> >> +      - ti,tmp110
> >> +      - ti,tmp113
> >
> >The driver has no match data and no compatible based decisions added in
> >your patch. Why is a fallback to tmp102 not suitable?
> >
> Thanks for the review, it is now more clear to me. You are right, the
> fallback to tmp102 can be used. My intentions were to be able to make it
> clear in the dts which is the real used sensor on the board but this can
> be achieved via the node name (or label). 

No, node name or label is not how you do that. compatible is the right 
way.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-15 17:18 ` [PATCH 1/2] dt-bindings: hwmon: tmp102: Add " Conor Dooley
  2025-09-16  6:33   ` Flaviu Nistor
@ 2025-09-24 15:55   ` Guenter Roeck
  2025-09-24 18:12     ` Conor Dooley
  1 sibling, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2025-09-24 15:55 UTC (permalink / raw)
  To: Conor Dooley, Flaviu Nistor
  Cc: Jean Delvare, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-hwmon, devicetree, linux-kernel

On 9/15/25 10:18, Conor Dooley wrote:
> On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
>> Add a compatible string for TMP110 and TMP113 devices.
>>
>> Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
>> ---
>>   Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> index 96b2e4969f78..840b5306a8cf 100644
>> --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> @@ -13,6 +13,8 @@ properties:
>>     compatible:
>>       enum:
>>         - ti,tmp102
>> +      - ti,tmp110
>> +      - ti,tmp113
> 
> The driver has no match data and no compatible based decisions added in
> your patch. Why is a fallback to tmp102 not suitable?
> 

That should work for tmp110. However, tmp113 does have additional registers, and it
might be desirable to report the content of those using debugfs. Fallback for that chip
would work for now, but that might have to change later if support for the additional
registers is added to the driver.

Guenter

>>   
>>     interrupts:
>>       maxItems: 1
>> -- 
>> 2.43.0
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-24 15:55   ` Guenter Roeck
@ 2025-09-24 18:12     ` Conor Dooley
  2025-09-29 17:07       ` Flaviu Nistor
  0 siblings, 1 reply; 8+ messages in thread
From: Conor Dooley @ 2025-09-24 18:12 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Flaviu Nistor, Jean Delvare, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-hwmon, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

On Wed, Sep 24, 2025 at 08:55:39AM -0700, Guenter Roeck wrote:
> On 9/15/25 10:18, Conor Dooley wrote:
> > On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
> > > Add a compatible string for TMP110 and TMP113 devices.
> > > 
> > > Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
> > > ---
> > >   Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
> > >   1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> > > index 96b2e4969f78..840b5306a8cf 100644
> > > --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> > > +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
> > > @@ -13,6 +13,8 @@ properties:
> > >     compatible:
> > >       enum:
> > >         - ti,tmp102
> > > +      - ti,tmp110
> > > +      - ti,tmp113
> > 
> > The driver has no match data and no compatible based decisions added in
> > your patch. Why is a fallback to tmp102 not suitable?
> > 
> 
> That should work for tmp110. However, tmp113 does have additional registers, and it
> might be desirable to report the content of those using debugfs. Fallback for that chip
> would work for now, but that might have to change later if support for the additional
> registers is added to the driver.

In that case, only the driver would need to change not the binding.
That's fine though, of course.

> 
> Guenter
> 
> > >     interrupts:
> > >       maxItems: 1
> > > -- 
> > > 2.43.0
> > > 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices
  2025-09-24 18:12     ` Conor Dooley
@ 2025-09-29 17:07       ` Flaviu Nistor
  0 siblings, 0 replies; 8+ messages in thread
From: Flaviu Nistor @ 2025-09-29 17:07 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Rob Herring, Guenter Roeck, Jean Delvare, Krzysztof Kozlowski,
	Flaviu Nistor, linux-hwmon, devicetree, linux-kernel

On Mon, Sep 24, 2025 at 19:12:26 +0100, Conor Dooley wrote:
>On Wed, Sep 24, 2025 at 08:55:39AM -0700, Guenter Roeck wrote:
>> On 9/15/25 10:18, Conor Dooley wrote:
>> > On Mon, Sep 15, 2025 at 08:08:18PM +0300, Flaviu Nistor wrote:
>> > > Add a compatible string for TMP110 and TMP113 devices.
>> > > 
>> > > Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
>> > > ---
>> > >   Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml | 2 ++
>> > >   1 file changed, 2 insertions(+)
>> > > 
>> > > diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> > > index 96b2e4969f78..840b5306a8cf 100644
>> > > --- a/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> > > +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp102.yaml
>> > > @@ -13,6 +13,8 @@ properties:
>> > >     compatible:
>> > >       enum:
>> > >         - ti,tmp102
>> > > +      - ti,tmp110
>> > > +      - ti,tmp113
>> > 
>> > The driver has no match data and no compatible based decisions added in
>> > your patch. Why is a fallback to tmp102 not suitable?
>> > 
>> 
>> That should work for tmp110. However, tmp113 does have additional registers, and it
>> might be desirable to report the content of those using debugfs. Fallback for that chip
>> would work for now, but that might have to change later if support for the additional
>> registers is added to the driver.
>
>In that case, only the driver would need to change not the binding.
>That's fine though, of course.
>

I am a little confused and I would appreciate some advice if I should leave
the series as it is or send a v2 only for documentation and Kconfig updates,
droping the binding update?

>> 
>> Guenter
>> 
>> > >     interrupts:
>> > >       maxItems: 1
>> > > -- 
>> > > 2.43.0
>> > > 
>> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-29 17:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 17:08 [PATCH 1/2] dt-bindings: hwmon: tmp102: Add TMP110 and TMP113 devices Flaviu Nistor
2025-09-15 17:08 ` [PATCH 2/2] hwmon: tmp102: Add support for " Flaviu Nistor
2025-09-15 17:18 ` [PATCH 1/2] dt-bindings: hwmon: tmp102: Add " Conor Dooley
2025-09-16  6:33   ` Flaviu Nistor
2025-09-22 16:20     ` Rob Herring
2025-09-24 15:55   ` Guenter Roeck
2025-09-24 18:12     ` Conor Dooley
2025-09-29 17:07       ` Flaviu Nistor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).