Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips
@ 2019-10-29 15:04 Tremblay, Eric
  2019-11-02 15:15 ` Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tremblay, Eric @ 2019-10-29 15:04 UTC (permalink / raw)
  To: linux-hwmon, devicetree, linux-doc
  Cc: Jean Delvare, Guenter Roeck, robh+dt, mark.rutland, Jonathan Corbet

dt-bindings: hwmon: Add TMP512/513

Add dt-binding for TMP512/513 sensor chips

Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>
---
 .../devicetree/bindings/hwmon/ti,tmp513.yaml  | 88 +++++++++++++++++++
 1 file changed, 88 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
new file mode 100644
index 000000000000..e5f3c72ff548
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2018 Linaro Ltd.
+%YAML 1.2
+---
+
+$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TMP513/512 system monitor sensor
+
+maintainers:
+  - Eric Tremblay <etremblay@distech-controls.com>
+
+description: |
+  The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors that include
+  remote sensors, a local temperature sensor, and a high-side current shunt monitor.
+  These system monitors have the capability of measuring remote temperatures,
+  on-chip temperatures, and system voltage/power/current consumption.
+
+  Datasheets:
+  http://www.ti.com/lit/gpn/tmp513
+  http://www.ti.com/lit/gpn/tmp512
+
+
+properties:
+  compatible:
+    enum:
+      - ti,tmp512
+      - ti,tmp513
+
+  reg:
+    maxItems: 1
+
+  shunt-resistor-micro-ohms:
+    description: |
+      If 0, the calibration process will be skiped and the current and power
+      measurement engine will not work. Temperature and voltage measurement
+      will continue to work.
+      The shunt value also need to respect : rshunt <= pga-gain * 40 * 1000 * 1000.
+      If not, it's not possible to compute a valid calibration value.
+    default: 1000
+
+  ti,pga-gain:
+    description: |
+      The gain value for the PGA function. This is 8, 4, 2 or 1.
+      The PGA gain affect the shunt voltage range.
+      The range will be equal to: pga-gain * 40mV
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [1, 2, 4, 8]
+    default: 8
+
+  ti,bus-voltage-range-volt:
+    description: |
+      This is the operating range of the bus voltage
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32
+    enum: [16, 32]
+    default: 32
+
+  ti,nfactor:
+    description: |
+      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
+      temperature channel.
+      See datasheet Table 11 for n-Factor range list and value interpretation.
+    allOf:
+      - $ref: /schemas/types.yaml#definitions/uint8-array
+      - minItems: 2
+        maxItems: 3
+        items:
+          default: 0
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c {
+        tmp513@5c {
+            compatible = "ti,tmp513";
+            reg = <0x5C>;
+            shunt-resistor-micro-ohms = <330000>;
+            ti,bus-voltage-range-volts = <32>;
+            ti,pga-gain = <8>;
+            ti,nfactor = [01 F3 00];
+        };
+    };
-- 
2.17.1


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

* Re: [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips
  2019-10-29 15:04 [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips Tremblay, Eric
@ 2019-11-02 15:15 ` Guenter Roeck
  2019-11-02 15:30 ` Guenter Roeck
  2019-11-04 21:45 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2019-11-02 15:15 UTC (permalink / raw)
  To: Tremblay, Eric, linux-hwmon, devicetree, linux-doc
  Cc: Jean Delvare, robh+dt, mark.rutland, Jonathan Corbet

On 10/29/19 8:04 AM, Tremblay, Eric wrote:
> dt-bindings: hwmon: Add TMP512/513
> 
> Add dt-binding for TMP512/513 sensor chips
> 
> Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>

The two patches LGTM. Waiting for Reviewed-by: tag from DT maintainer.

Thanks,
Guenter

> ---
>   .../devicetree/bindings/hwmon/ti,tmp513.yaml  | 88 +++++++++++++++++++
>   1 file changed, 88 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> new file mode 100644
> index 000000000000..e5f3c72ff548
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2018 Linaro Ltd.
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TMP513/512 system monitor sensor
> +
> +maintainers:
> +  - Eric Tremblay <etremblay@distech-controls.com>
> +
> +description: |
> +  The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors that include
> +  remote sensors, a local temperature sensor, and a high-side current shunt monitor.
> +  These system monitors have the capability of measuring remote temperatures,
> +  on-chip temperatures, and system voltage/power/current consumption.
> +
> +  Datasheets:
> +  http://www.ti.com/lit/gpn/tmp513
> +  http://www.ti.com/lit/gpn/tmp512
> +
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,tmp512
> +      - ti,tmp513
> +
> +  reg:
> +    maxItems: 1
> +
> +  shunt-resistor-micro-ohms:
> +    description: |
> +      If 0, the calibration process will be skiped and the current and power
> +      measurement engine will not work. Temperature and voltage measurement
> +      will continue to work.
> +      The shunt value also need to respect : rshunt <= pga-gain * 40 * 1000 * 1000.
> +      If not, it's not possible to compute a valid calibration value.
> +    default: 1000
> +
> +  ti,pga-gain:
> +    description: |
> +      The gain value for the PGA function. This is 8, 4, 2 or 1.
> +      The PGA gain affect the shunt voltage range.
> +      The range will be equal to: pga-gain * 40mV
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 8]
> +    default: 8
> +
> +  ti,bus-voltage-range-volt:
> +    description: |
> +      This is the operating range of the bus voltage
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [16, 32]
> +    default: 32
> +
> +  ti,nfactor:
> +    description: |
> +      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
> +      temperature channel.
> +      See datasheet Table 11 for n-Factor range list and value interpretation.
> +    allOf:
> +      - $ref: /schemas/types.yaml#definitions/uint8-array
> +      - minItems: 2
> +        maxItems: 3
> +        items:
> +          default: 0
> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    i2c {
> +        tmp513@5c {
> +            compatible = "ti,tmp513";
> +            reg = <0x5C>;
> +            shunt-resistor-micro-ohms = <330000>;
> +            ti,bus-voltage-range-volts = <32>;
> +            ti,pga-gain = <8>;
> +            ti,nfactor = [01 F3 00];
> +        };
> +    };
> 


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

* Re: [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips
  2019-10-29 15:04 [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips Tremblay, Eric
  2019-11-02 15:15 ` Guenter Roeck
@ 2019-11-02 15:30 ` Guenter Roeck
  2019-11-04 14:28   ` Tremblay, Eric
  2019-11-04 21:45 ` Rob Herring
  2 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2019-11-02 15:30 UTC (permalink / raw)
  To: Tremblay, Eric, linux-hwmon, devicetree, linux-doc
  Cc: Jean Delvare, robh+dt, mark.rutland, Jonathan Corbet

On 10/29/19 8:04 AM, Tremblay, Eric wrote:
> dt-bindings: hwmon: Add TMP512/513
> 
> Add dt-binding for TMP512/513 sensor chips
> 
> Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>
I do get the following warnings:

Documentation/hwmon/tmp513.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
Documentation/hwmon/tmp513.rst: WARNING: document isn't included in any toctree

The .rst file needs to be added to Documentation/hwmon/index.rst. No idea what
the first problem is.

Guenter

> ---
>   .../devicetree/bindings/hwmon/ti,tmp513.yaml  | 88 +++++++++++++++++++
>   1 file changed, 88 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> new file mode 100644
> index 000000000000..e5f3c72ff548
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2018 Linaro Ltd.
> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TMP513/512 system monitor sensor
> +
> +maintainers:
> +  - Eric Tremblay <etremblay@distech-controls.com>
> +
> +description: |
> +  The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors that include
> +  remote sensors, a local temperature sensor, and a high-side current shunt monitor.
> +  These system monitors have the capability of measuring remote temperatures,
> +  on-chip temperatures, and system voltage/power/current consumption.
> +
> +  Datasheets:
> +  http://www.ti.com/lit/gpn/tmp513
> +  http://www.ti.com/lit/gpn/tmp512
> +
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,tmp512
> +      - ti,tmp513
> +
> +  reg:
> +    maxItems: 1
> +
> +  shunt-resistor-micro-ohms:
> +    description: |
> +      If 0, the calibration process will be skiped and the current and power
> +      measurement engine will not work. Temperature and voltage measurement
> +      will continue to work.
> +      The shunt value also need to respect : rshunt <= pga-gain * 40 * 1000 * 1000.
> +      If not, it's not possible to compute a valid calibration value.
> +    default: 1000
> +
> +  ti,pga-gain:
> +    description: |
> +      The gain value for the PGA function. This is 8, 4, 2 or 1.
> +      The PGA gain affect the shunt voltage range.
> +      The range will be equal to: pga-gain * 40mV
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 8]
> +    default: 8
> +
> +  ti,bus-voltage-range-volt:
> +    description: |
> +      This is the operating range of the bus voltage
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [16, 32]
> +    default: 32
> +
> +  ti,nfactor:
> +    description: |
> +      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
> +      temperature channel.
> +      See datasheet Table 11 for n-Factor range list and value interpretation.
> +    allOf:
> +      - $ref: /schemas/types.yaml#definitions/uint8-array
> +      - minItems: 2
> +        maxItems: 3
> +        items:
> +          default: 0
> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    i2c {
> +        tmp513@5c {
> +            compatible = "ti,tmp513";
> +            reg = <0x5C>;
> +            shunt-resistor-micro-ohms = <330000>;
> +            ti,bus-voltage-range-volts = <32>;
> +            ti,pga-gain = <8>;
> +            ti,nfactor = [01 F3 00];
> +        };
> +    };
> 


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

* RE: [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips
  2019-11-02 15:30 ` Guenter Roeck
@ 2019-11-04 14:28   ` Tremblay, Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Tremblay, Eric @ 2019-11-04 14:28 UTC (permalink / raw)
  To: Guenter Roeck, linux-hwmon, devicetree, linux-doc
  Cc: Jean Delvare, robh+dt, mark.rutland, Jonathan Corbet

> On 10/29/19 8:04 AM, Tremblay, Eric wrote:
> > dt-bindings: hwmon: Add TMP512/513
> >
> > Add dt-binding for TMP512/513 sensor chips
> >
> > Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>
> I do get the following warnings:
> 
> Documentation/hwmon/tmp513.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.
> Documentation/hwmon/tmp513.rst: WARNING: document isn't included in any toctree
> 
> The .rst file needs to be added to Documentation/hwmon/index.rst. No idea what the first problem is.
> 
> Guenter

The first warning was a missing empty line after the license-Identifier.

I'll wait for bindings review then resubmit with the documentations fixes.

Thanks
 
> 
> > ---
> >   .../devicetree/bindings/hwmon/ti,tmp513.yaml  | 88 +++++++++++++++++++
> >   1 file changed, 88 insertions(+)
> >   create mode 100644
> > Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> > b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> > new file mode 100644
> > index 000000000000..e5f3c72ff548
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> > @@ -0,0 +1,88 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright 2018
> > +Linaro Ltd.
> > +%YAML 1.2
> > +---
> > +
> > +$id:
> > +https://urldefense.proofpoint.com/v2/url?u=http-3A__devicetree.org_sc
> > +hemas_hwmon_ti-2Ctmp513.yaml-23&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0Qna
> > +kIsmmGcwejQDVxD-g&r=y34zLl9_AvBy5NSrvskG6SFbiKoCzI99WW2xhKlsVV4&m=gHR
> > +Ok_Dbgs_OeUN4Ho5czv_vfxbxT5oJboKcfQ8pb9c&s=HvM497Y_TfiYsrbgEJwUA7akpT
> > +8B1iw574s8U07g33U&e=
> > +$schema:
> > +https://urldefense.proofpoint.com/v2/url?u=http-3A__devicetree.org_me
> > +ta-2Dschemas_core.yaml-23&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmG
> > +cwejQDVxD-g&r=y34zLl9_AvBy5NSrvskG6SFbiKoCzI99WW2xhKlsVV4&m=gHROk_Dbg
> > +s_OeUN4Ho5czv_vfxbxT5oJboKcfQ8pb9c&s=xN_rsjAGGv2726S7t192bq_USllTcJ6n
> > +85vSlDFWjV8&e=
> > +
> > +title: TMP513/512 system monitor sensor
> > +
> > +maintainers:
> > +  - Eric Tremblay <etremblay@distech-controls.com>
> > +
> > +description: |
> > +  The TMP512 (dual-channel) and TMP513 (triple-channel) are system
> > +monitors that include
> > +  remote sensors, a local temperature sensor, and a high-side current shunt monitor.
> > +  These system monitors have the capability of measuring remote
> > +temperatures,
> > +  on-chip temperatures, and system voltage/power/current consumption.
> > +
> > +  Datasheets:
> > +
> > + https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ti.com_lit_g
> > + pn_tmp513&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=y
> > + 34zLl9_AvBy5NSrvskG6SFbiKoCzI99WW2xhKlsVV4&m=gHROk_Dbgs_OeUN4Ho5czv_
> > + vfxbxT5oJboKcfQ8pb9c&s=rJ6zr6BprlwewjKUzVr6PeEqP6cCsdxTF_SzNOmwZiA&e
> > + =
> > + https://urldefense.proofpoint.com/v2/url?u=http-3A__www.ti.com_lit_g
> > + pn_tmp512&d=DwICaQ&c=tvvHx3uC0XdtgG-ImPDjfM0QnakIsmmGcwejQDVxD-g&r=y
> > + 34zLl9_AvBy5NSrvskG6SFbiKoCzI99WW2xhKlsVV4&m=gHROk_Dbgs_OeUN4Ho5czv_
> > + vfxbxT5oJboKcfQ8pb9c&s=NCK1yfHisyz7dLEylm8cObUISdImgC5OCY1wV9TJdsA&e
> > + =
> > +
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,tmp512
> > +      - ti,tmp513
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  shunt-resistor-micro-ohms:
> > +    description: |
> > +      If 0, the calibration process will be skiped and the current and power
> > +      measurement engine will not work. Temperature and voltage measurement
> > +      will continue to work.
> > +      The shunt value also need to respect : rshunt <= pga-gain * 40 * 1000 * 1000.
> > +      If not, it's not possible to compute a valid calibration value.
> > +    default: 1000
> > +
> > +  ti,pga-gain:
> > +    description: |
> > +      The gain value for the PGA function. This is 8, 4, 2 or 1.
> > +      The PGA gain affect the shunt voltage range.
> > +      The range will be equal to: pga-gain * 40mV
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum: [1, 2, 4, 8]
> > +    default: 8
> > +
> > +  ti,bus-voltage-range-volt:
> > +    description: |
> > +      This is the operating range of the bus voltage
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum: [16, 32]
> > +    default: 32
> > +
> > +  ti,nfactor:
> > +    description: |
> > +      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
> > +      temperature channel.
> > +      See datasheet Table 11 for n-Factor range list and value interpretation.
> > +    allOf:
> > +      - $ref: /schemas/types.yaml#definitions/uint8-array
> > +      - minItems: 2
> > +        maxItems: 3
> > +        items:
> > +          default: 0
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +examples:
> > +  - |
> > +    i2c {
> > +        tmp513@5c {
> > +            compatible = "ti,tmp513";
> > +            reg = <0x5C>;
> > +            shunt-resistor-micro-ohms = <330000>;
> > +            ti,bus-voltage-range-volts = <32>;
> > +            ti,pga-gain = <8>;
> > +            ti,nfactor = [01 F3 00];
> > +        };
> > +    };
> >


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

* Re: [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips
  2019-10-29 15:04 [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips Tremblay, Eric
  2019-11-02 15:15 ` Guenter Roeck
  2019-11-02 15:30 ` Guenter Roeck
@ 2019-11-04 21:45 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2019-11-04 21:45 UTC (permalink / raw)
  To: Tremblay, Eric
  Cc: linux-hwmon, devicetree, linux-doc, Jean Delvare, Guenter Roeck,
	mark.rutland, Jonathan Corbet

On Tue, Oct 29, 2019 at 03:04:31PM +0000, Tremblay, Eric wrote:
> dt-bindings: hwmon: Add TMP512/513

Did you mean for this to be the subject. Otherwise you've got the same 
subject for both patches.

> 
> Add dt-binding for TMP512/513 sensor chips
> 
> Signed-off-by: Eric Tremblay <etremblay@distech-controls.com>
> ---
>  .../devicetree/bindings/hwmon/ti,tmp513.yaml  | 88 +++++++++++++++++++
>  1 file changed, 88 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> new file mode 100644
> index 000000000000..e5f3c72ff548
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/ti,tmp513.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2018 Linaro Ltd.

Really? 

> +%YAML 1.2
> +---
> +
> +$id: http://devicetree.org/schemas/hwmon/ti,tmp513.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TMP513/512 system monitor sensor
> +
> +maintainers:
> +  - Eric Tremblay <etremblay@distech-controls.com>
> +
> +description: |
> +  The TMP512 (dual-channel) and TMP513 (triple-channel) are system monitors that include
> +  remote sensors, a local temperature sensor, and a high-side current shunt monitor.
> +  These system monitors have the capability of measuring remote temperatures,
> +  on-chip temperatures, and system voltage/power/current consumption.

Wrap lines at <80 chars.

> +
> +  Datasheets:
> +  http://www.ti.com/lit/gpn/tmp513
> +  http://www.ti.com/lit/gpn/tmp512
> +
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,tmp512
> +      - ti,tmp513
> +
> +  reg:
> +    maxItems: 1
> +
> +  shunt-resistor-micro-ohms:
> +    description: |
> +      If 0, the calibration process will be skiped and the current and power
> +      measurement engine will not work. Temperature and voltage measurement
> +      will continue to work.
> +      The shunt value also need to respect : rshunt <= pga-gain * 40 * 1000 * 1000.
> +      If not, it's not possible to compute a valid calibration value.
> +    default: 1000
> +
> +  ti,pga-gain:
> +    description: |
> +      The gain value for the PGA function. This is 8, 4, 2 or 1.
> +      The PGA gain affect the shunt voltage range.
> +      The range will be equal to: pga-gain * 40mV
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 4, 8]
> +    default: 8
> +
> +  ti,bus-voltage-range-volt:
> +    description: |
> +      This is the operating range of the bus voltage
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [16, 32]
> +    default: 32

If this is in volts then it needs '-volt' defined in property-units.txt 
or just use microvolt. My preference is the latter as you have enough 
range.

Also, 'voltage' is kind of redundant if with the units.

> +
> +  ti,nfactor:
> +    description: |
> +      Array of three(TMP513) or two(TMP512) n-Factor value for each remote
> +      temperature channel.
> +      See datasheet Table 11 for n-Factor range list and value interpretation.
> +    allOf:
> +      - $ref: /schemas/types.yaml#definitions/uint8-array
> +      - minItems: 2
> +        maxItems: 3
> +        items:
> +          default: 0
> +
> +required:
> +  - compatible
> +  - reg
> +
> +examples:
> +  - |
> +    i2c {
> +        tmp513@5c {
> +            compatible = "ti,tmp513";
> +            reg = <0x5C>;
> +            shunt-resistor-micro-ohms = <330000>;
> +            ti,bus-voltage-range-volts = <32>;
> +            ti,pga-gain = <8>;
> +            ti,nfactor = [01 F3 00];
> +        };
> +    };
> -- 
> 2.17.1
> 

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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 15:04 [PATCH v6 1/2] hwmon: Add driver for Texas Instruments TMP512/513 sensor chips Tremblay, Eric
2019-11-02 15:15 ` Guenter Roeck
2019-11-02 15:30 ` Guenter Roeck
2019-11-04 14:28   ` Tremblay, Eric
2019-11-04 21:45 ` Rob Herring

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org
	public-inbox-index linux-hwmon

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git