diff mbox series

[1/2] dt-bindings: hwmon: Add AMS AS6200 temperature sensor

Message ID 149032e99136a9fe47c3533b57a71092646e497d.1702744180.git.alkuor@gmail.com (mailing list archive)
State Changes Requested
Headers show
Series [1/2] dt-bindings: hwmon: Add AMS AS6200 temperature sensor | expand

Commit Message

Abdel Alkuor Dec. 16, 2023, 4:39 p.m. UTC
as6200 is a temperature sensor with a range between -40°C to
125°C degrees and an accuracy of ±0.4°C degree between 0
and 65°C and ±1°C for the other ranges.

Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
---
 .../devicetree/bindings/hwmon/ams,as6200.yaml | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/ams,as6200.yaml

Comments

Conor Dooley Dec. 17, 2023, 8:58 p.m. UTC | #1
On Sat, Dec 16, 2023 at 11:39:29AM -0500, Abdel Alkuor wrote:
> as6200 is a temperature sensor with a range between -40°C to
> 125°C degrees and an accuracy of ±0.4°C degree between 0
> and 65°C and ±1°C for the other ranges.
> 
> Signed-off-by: Abdel Alkuor <alkuor@gmail.com>

Is this not v3?
Either way,
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

> ---
>  .../devicetree/bindings/hwmon/ams,as6200.yaml | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/ams,as6200.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml b/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml
> new file mode 100644
> index 000000000000..01476c1a4c98
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/ams,as6200.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: AMS AS6200 Temperature Sensor
> +
> +maintainers:
> +  - Abdel Alkuor <alkuor@gmail.com>
> +
> +description: |
> +  as6200 is a temperature sensor with a range between -40°C to
> +  125°C degrees and an accuracy of ±0.4°C degree between 0
> +  and 65°C and ±1°C for the other ranges.
> +  https://ams.com/documents/20143/36005/AS6200_DS000449_4-00.pdf
> +
> +properties:
> +  compatible:
> +    const: ams,as6200
> +
> +  reg:
> +    maxItems: 1
> +
> +  vdd-supply: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        temperature-sensor@48 {
> +            compatible = "ams,as6200";
> +            reg = <0x48>;
> +            vdd-supply = <&vdd>;
> +            interrupt-parent = <&gpio1>;
> +            interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
> +        };
> +    };
> +...
> -- 
> 2.34.1
>
Guenter Roeck Dec. 17, 2023, 9:39 p.m. UTC | #2
On 12/17/23 12:58, Conor Dooley wrote:
> On Sat, Dec 16, 2023 at 11:39:29AM -0500, Abdel Alkuor wrote:
>> as6200 is a temperature sensor with a range between -40°C to
>> 125°C degrees and an accuracy of ±0.4°C degree between 0
>> and 65°C and ±1°C for the other ranges.
>>
>> Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
> 
> Is this not v3?

FWIW, I don't recall seeing it.

> Either way,
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 

As I pointed out in my reply to the other patch, this chip is mostly
compatible to lm75 and almost register-compatible to tmp112, the only
difference being some configuration register bits.

Bindings for this chip should be added to
Documentation/devicetree/bindings/hwmon/lm75.yaml.

Thanks,
Guenter
Conor Dooley Dec. 17, 2023, 9:44 p.m. UTC | #3
On Sun, Dec 17, 2023 at 01:39:37PM -0800, Guenter Roeck wrote:
> On 12/17/23 12:58, Conor Dooley wrote:
> > On Sat, Dec 16, 2023 at 11:39:29AM -0500, Abdel Alkuor wrote:
> > > as6200 is a temperature sensor with a range between -40°C to
> > > 125°C degrees and an accuracy of ±0.4°C degree between 0
> > > and 65°C and ±1°C for the other ranges.
> > > 
> > > Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
> > 
> > Is this not v3?
> 
> FWIW, I don't recall seeing it.

Ah, I think this was originally submitted to iio, went through 2
iterations and then ended up here on Jonathan's advice.

> 
> > Either way,
> > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> > 
> 
> As I pointed out in my reply to the other patch, this chip is mostly
> compatible to lm75 and almost register-compatible to tmp112, the only
> difference being some configuration register bits.
> 
> Bindings for this chip should be added to
> Documentation/devicetree/bindings/hwmon/lm75.yaml.

Ah. In that case, I would expect my tag not to be picked up by Abdel.
Guenter Roeck Dec. 18, 2023, 12:57 a.m. UTC | #4
On 12/17/23 13:44, Conor Dooley wrote:
> On Sun, Dec 17, 2023 at 01:39:37PM -0800, Guenter Roeck wrote:
>> On 12/17/23 12:58, Conor Dooley wrote:
>>> On Sat, Dec 16, 2023 at 11:39:29AM -0500, Abdel Alkuor wrote:
>>>> as6200 is a temperature sensor with a range between -40°C to
>>>> 125°C degrees and an accuracy of ±0.4°C degree between 0
>>>> and 65°C and ±1°C for the other ranges.
>>>>
>>>> Signed-off-by: Abdel Alkuor <alkuor@gmail.com>
>>>
>>> Is this not v3?
>>
>> FWIW, I don't recall seeing it.
> 
> Ah, I think this was originally submitted to iio, went through 2
> iterations and then ended up here on Jonathan's advice.
> 

Hmm, yes, that would have been a duplicate. If iio support for lm75
compatible sensors is needed for some reason, a hwmon -> iio bridge
would make more sense.

Thanks,
Guenter

>>
>>> Either way,
>>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>>
>>
>> As I pointed out in my reply to the other patch, this chip is mostly
>> compatible to lm75 and almost register-compatible to tmp112, the only
>> difference being some configuration register bits.
>>
>> Bindings for this chip should be added to
>> Documentation/devicetree/bindings/hwmon/lm75.yaml.
> 
> Ah. In that case, I would expect my tag not to be picked up by Abdel.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml b/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml
new file mode 100644
index 000000000000..01476c1a4c98
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ams,as6200.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/ams,as6200.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AMS AS6200 Temperature Sensor
+
+maintainers:
+  - Abdel Alkuor <alkuor@gmail.com>
+
+description: |
+  as6200 is a temperature sensor with a range between -40°C to
+  125°C degrees and an accuracy of ±0.4°C degree between 0
+  and 65°C and ±1°C for the other ranges.
+  https://ams.com/documents/20143/36005/AS6200_DS000449_4-00.pdf
+
+properties:
+  compatible:
+    const: ams,as6200
+
+  reg:
+    maxItems: 1
+
+  vdd-supply: true
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        temperature-sensor@48 {
+            compatible = "ams,as6200";
+            reg = <0x48>;
+            vdd-supply = <&vdd>;
+            interrupt-parent = <&gpio1>;
+            interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
+        };
+    };
+...