* [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
@ 2023-05-10 18:56 Anup Sharma
2023-05-11 9:28 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: Anup Sharma @ 2023-05-10 18:56 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Anup Sharma, Peter Meerwald,
broonie
Cc: linux-iio, devicetree, linux-kernel
Add devicetree binding document for TMP006, IR thermopile sensor.
Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
---
.../bindings/iio/temperature/ti,tmp006.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
new file mode 100644
index 000000000000..c6c5a4d10898
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/temperature/ti,tmp006.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TMP006 IR thermopile sensor
+
+maintainers:
+ - Peter Meerwald <pmeerw@pmeerw.net>
+
+description: |
+ TI TMP006 - Infrared Thermopile Sensor in Chip-Scale Package.
+ https://cdn.sparkfun.com/datasheets/Sensors/Temp/tmp006.pdf
+
+properties:
+ compatible:
+ const: ti,tmp006
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ tmp006@40 {
+ compatible = "ti,tmp006";
+ reg = <0x40>;
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
2023-05-10 18:56 [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006 Anup Sharma
@ 2023-05-11 9:28 ` Krzysztof Kozlowski
2023-05-11 19:06 ` Anup Sharma
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-11 9:28 UTC (permalink / raw)
To: Anup Sharma, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Peter Meerwald, broonie
Cc: linux-iio, devicetree, linux-kernel
On 10/05/2023 20:56, Anup Sharma wrote:
> Add devicetree binding document for TMP006, IR thermopile sensor.
Why? Where is any user of this? DTS? Driver?
Subject: drop second/last, redundant "DT bindings for". The
"dt-bindings" prefix is already stating that these are bindings.
>
> Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
> ---
> .../bindings/iio/temperature/ti,tmp006.yaml | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
> new file mode 100644
> index 000000000000..c6c5a4d10898
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/temperature/ti,tmp006.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI TMP006 IR thermopile sensor
> +
> +maintainers:
> + - Peter Meerwald <pmeerw@pmeerw.net>
> +
> +description: |
> + TI TMP006 - Infrared Thermopile Sensor in Chip-Scale Package.
> + https://cdn.sparkfun.com/datasheets/Sensors/Temp/tmp006.pdf
> +
> +properties:
> + compatible:
> + const: ti,tmp006
> +
> + reg:
> + maxItems: 1
Missing supply.
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + tmp006@40 {
Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
temperature-sensor?
> + compatible = "ti,tmp006";
> + reg = <0x40>;
> + };
> + };
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
2023-05-11 9:28 ` Krzysztof Kozlowski
@ 2023-05-11 19:06 ` Anup Sharma
2023-05-12 6:28 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: Anup Sharma @ 2023-05-11 19:06 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Anup Sharma, Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Peter Meerwald, broonie,
linux-iio, devicetree, linux-kernel
On Thu, May 11, 2023 at 11:28:50AM +0200, Krzysztof Kozlowski wrote:
> On 10/05/2023 20:56, Anup Sharma wrote:
> > Add devicetree binding document for TMP006, IR thermopile sensor.
>
> Why? Where is any user of this? DTS? Driver?
>
The support for TMP006 is available at driver/iio/temperature
> Subject: drop second/last, redundant "DT bindings for". The
> "dt-bindings" prefix is already stating that these are bindings.
>
Okay, will take care in v2.
> >
> > Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
> > ---
> > .../bindings/iio/temperature/ti,tmp006.yaml | 38 +++++++++++++++++++
> > 1 file changed, 38 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
> > new file mode 100644
> > index 000000000000..c6c5a4d10898
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/temperature/ti,tmp006.yaml
> > @@ -0,0 +1,38 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/temperature/ti,tmp006.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: TI TMP006 IR thermopile sensor
> > +
> > +maintainers:
> > + - Peter Meerwald <pmeerw@pmeerw.net>
> > +
> > +description: |
> > + TI TMP006 - Infrared Thermopile Sensor in Chip-Scale Package.
> > + https://cdn.sparkfun.com/datasheets/Sensors/Temp/tmp006.pdf
> > +
> > +properties:
> > + compatible:
> > + const: ti,tmp006
> > +
> > + reg:
> > + maxItems: 1
>
> Missing supply.
>
Will add in v2.
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + i2c {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > + tmp006@40 {
>
> Node names should be generic.
> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
>
> temperature-sensor?
>
Thanks, I have noticed that out of the 8 temperature sensor bindings,
5 are using 'temp-sensor' as the node name, 2 are using 'temperature-sensor',
and 1 is non-generic. According to this docs generic names recommendation
'temperature-sensor' seems to be ideal node name. Should I also proceed
updating all the temperature sensor's node names to a generic format?
> > + compatible = "ti,tmp006";
> > + reg = <0x40>;
> > + };
> > + };
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
2023-05-11 19:06 ` Anup Sharma
@ 2023-05-12 6:28 ` Krzysztof Kozlowski
2023-05-13 18:50 ` Jonathan Cameron
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-12 6:28 UTC (permalink / raw)
To: Anup Sharma
Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Peter Meerwald, broonie,
linux-iio, devicetree, linux-kernel
On 11/05/2023 21:06, Anup Sharma wrote:
> On Thu, May 11, 2023 at 11:28:50AM +0200, Krzysztof Kozlowski wrote:
>> On 10/05/2023 20:56, Anup Sharma wrote:
>>> Add devicetree binding document for TMP006, IR thermopile sensor.
>>
>> Why? Where is any user of this? DTS? Driver?
>>
>
> The support for TMP006 is available at driver/iio/temperature
There is no such compatible in the kernel. If you add OF support, you
should change the driver.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
2023-05-13 18:50 ` Jonathan Cameron
@ 2023-05-13 18:35 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-13 18:35 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Anup Sharma, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Peter Meerwald, broonie,
linux-iio, devicetree, linux-kernel
On 13/05/2023 20:50, Jonathan Cameron wrote:
> On Fri, 12 May 2023 08:28:29 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
>> On 11/05/2023 21:06, Anup Sharma wrote:
>>> On Thu, May 11, 2023 at 11:28:50AM +0200, Krzysztof Kozlowski wrote:
>>>> On 10/05/2023 20:56, Anup Sharma wrote:
>>>>> Add devicetree binding document for TMP006, IR thermopile sensor.
>>>>
>>>> Why? Where is any user of this? DTS? Driver?
>>>>
>>>
>>> The support for TMP006 is available at driver/iio/temperature
>>
>> There is no such compatible in the kernel. If you add OF support, you
>> should change the driver.
>
> (Very) old driver, so it uses the fallback method that i2c provides to bind to
> the compatible with the vendor id dropped via i2c_device_id entry.
Yeah, I know it works... but is very confusing :)
>
> Having said that, I'd also prefer the addition of an explicit of_device_id table.
> As there is only one supported device in this driver should be trivial.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006
2023-05-12 6:28 ` Krzysztof Kozlowski
@ 2023-05-13 18:50 ` Jonathan Cameron
2023-05-13 18:35 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2023-05-13 18:50 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Anup Sharma, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Peter Meerwald, broonie,
linux-iio, devicetree, linux-kernel
On Fri, 12 May 2023 08:28:29 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 11/05/2023 21:06, Anup Sharma wrote:
> > On Thu, May 11, 2023 at 11:28:50AM +0200, Krzysztof Kozlowski wrote:
> >> On 10/05/2023 20:56, Anup Sharma wrote:
> >>> Add devicetree binding document for TMP006, IR thermopile sensor.
> >>
> >> Why? Where is any user of this? DTS? Driver?
> >>
> >
> > The support for TMP006 is available at driver/iio/temperature
>
> There is no such compatible in the kernel. If you add OF support, you
> should change the driver.
(Very) old driver, so it uses the fallback method that i2c provides to bind to
the compatible with the vendor id dropped via i2c_device_id entry.
Having said that, I'd also prefer the addition of an explicit of_device_id table.
As there is only one supported device in this driver should be trivial.
Thanks,
Jonathan
>
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-13 18:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-10 18:56 [PATCH] dt-bindings: iio: temperature: Add DT bindings for TMP006 Anup Sharma
2023-05-11 9:28 ` Krzysztof Kozlowski
2023-05-11 19:06 ` Anup Sharma
2023-05-12 6:28 ` Krzysztof Kozlowski
2023-05-13 18:50 ` Jonathan Cameron
2023-05-13 18:35 ` Krzysztof Kozlowski
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).