devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients
@ 2023-07-12  8:11 Krzysztof Kozlowski
  2023-07-12 11:58 ` [PATCH] dt-bindings: hwmon: moortec, mr75203: " Farber, Eliav
  2023-07-14 20:45 ` [PATCH] dt-bindings: hwmon: moortec,mr75203: " Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-12  8:11 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Rahul Tanwar, Eliav Farber, linux-hwmon, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski

Few coefficients use default values multiple of 100, not 1000 (in the
example DTS and in the Linux driver):

  moortec,mr75203.example.dtb: pvt@e0680000: moortec,ts-coeff-g:0:0: 61400 is not a multiple of 1000

Fixes: bf1fdafdbc61 ("dt-bindings: hwmon: (mr75203) add coefficient properties for the thermal equation")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/hwmon/moortec,mr75203.yaml          | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
index ae4f68d4e696..bd67cfee6d19 100644
--- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
+++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
@@ -105,7 +105,7 @@ properties:
       G coefficient for temperature equation.
       Default for series 5 = 60000
       Default for series 6 = 57400
-    multipleOf: 1000
+    multipleOf: 100
     minimum: 1000
     $ref: /schemas/types.yaml#/definitions/uint32
 
@@ -114,7 +114,7 @@ properties:
       H coefficient for temperature equation.
       Default for series 5 = 200000
       Default for series 6 = 249400
-    multipleOf: 1000
+    multipleOf: 100
     minimum: 1000
     $ref: /schemas/types.yaml#/definitions/uint32
 
@@ -131,7 +131,7 @@ properties:
       J coefficient for temperature equation.
       Default for series 5 = -100
       Default for series 6 = 0
-    multipleOf: 1000
+    multipleOf: 100
     maximum: 0
     $ref: /schemas/types.yaml#/definitions/int32
 
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: hwmon: moortec, mr75203: fix multipleOf for coefficients
  2023-07-12  8:11 [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients Krzysztof Kozlowski
@ 2023-07-12 11:58 ` Farber, Eliav
  2023-07-12 12:07   ` Krzysztof Kozlowski
  2023-07-14 20:45 ` [PATCH] dt-bindings: hwmon: moortec,mr75203: " Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Farber, Eliav @ 2023-07-12 11:58 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Jean Delvare, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rahul Tanwar, linux-hwmon,
	devicetree, linux-kernel, farbere

On 7/12/2023 11:11 AM, Krzysztof Kozlowski wrote:
> Few coefficients use default values multiple of 100, not 1000 (in the
> example DTS and in the Linux driver):
>
>  moortec,mr75203.example.dtb: pvt@e0680000: moortec,ts-coeff-g:0:0: 
> 61400 is not a multiple of 1000

Why isn't multiple of 1000 correct?
According to the Moortec datasheet for the series 6 of the temperature 
sensor
the coefficients are:
G = 57.4 (57.4 * 1000 = 57400)
H = 249.4
For series 5 coefficients are:
G = 60 (60 * 1000 = 60000)
H = 200
J = -0.1

> Fixes: bf1fdafdbc61 ("dt-bindings: hwmon: (mr75203) add coefficient 
> properties for the thermal equation")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> .../devicetree/bindings/hwmon/moortec,mr75203.yaml          | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git 
> a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml 
> b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> index ae4f68d4e696..bd67cfee6d19 100644
> --- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> @@ -105,7 +105,7 @@ properties:
>       G coefficient for temperature equation.
>       Default for series 5 = 60000
>       Default for series 6 = 57400
> -    multipleOf: 1000
> +    multipleOf: 100
>     minimum: 1000
>     $ref: /schemas/types.yaml#/definitions/uint32
>
> @@ -114,7 +114,7 @@ properties:
>       H coefficient for temperature equation.
>       Default for series 5 = 200000
>       Default for series 6 = 249400
> -    multipleOf: 1000
> +    multipleOf: 100
>     minimum: 1000
>     $ref: /schemas/types.yaml#/definitions/uint32
>
> @@ -131,7 +131,7 @@ properties:
>       J coefficient for temperature equation.
>       Default for series 5 = -100
>       Default for series 6 = 0
> -    multipleOf: 1000
> +    multipleOf: 100
>     maximum: 0
>     $ref: /schemas/types.yaml#/definitions/int32
>
> -- 
> 2.34.1
>

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

* Re: [PATCH] dt-bindings: hwmon: moortec, mr75203: fix multipleOf for coefficients
  2023-07-12 11:58 ` [PATCH] dt-bindings: hwmon: moortec, mr75203: " Farber, Eliav
@ 2023-07-12 12:07   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-12 12:07 UTC (permalink / raw)
  To: Farber, Eliav, Jean Delvare, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rahul Tanwar, linux-hwmon,
	devicetree, linux-kernel

On 12/07/2023 13:58, Farber, Eliav wrote:
> On 7/12/2023 11:11 AM, Krzysztof Kozlowski wrote:
>> Few coefficients use default values multiple of 100, not 1000 (in the
>> example DTS and in the Linux driver):
>>
>>  moortec,mr75203.example.dtb: pvt@e0680000: moortec,ts-coeff-g:0:0: 
>> 61400 is not a multiple of 1000
> 
> Why isn't multiple of 1000 correct?

61400 is not a multiple of 1000, at least not in integers. 61400 is a
multiple of 100.

> According to the Moortec datasheet for the series 6 of the temperature 
> sensor
> the coefficients are:
> G = 57.4 (57.4 * 1000 = 57400)

57.4 is not integer. With that approach 1 is also multiple of 1000, because:

G = 1 * 0.001 * 1000.

> H = 249.4
> For series 5 coefficients are:
> G = 60 (60 * 1000 = 60000)
> H = 200
> J = -0.1

Trim the context of replies. No need to quote entire text below.

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients
  2023-07-12  8:11 [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients Krzysztof Kozlowski
  2023-07-12 11:58 ` [PATCH] dt-bindings: hwmon: moortec, mr75203: " Farber, Eliav
@ 2023-07-14 20:45 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2023-07-14 20:45 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, devicetree, linux-kernel, linux-hwmon, Rob Herring,
	Jean Delvare, Krzysztof Kozlowski, Eliav Farber, Rahul Tanwar,
	Guenter Roeck


On Wed, 12 Jul 2023 10:11:24 +0200, Krzysztof Kozlowski wrote:
> Few coefficients use default values multiple of 100, not 1000 (in the
> example DTS and in the Linux driver):
> 
>   moortec,mr75203.example.dtb: pvt@e0680000: moortec,ts-coeff-g:0:0: 61400 is not a multiple of 1000
> 
> Fixes: bf1fdafdbc61 ("dt-bindings: hwmon: (mr75203) add coefficient properties for the thermal equation")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/hwmon/moortec,mr75203.yaml          | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Applied, thanks!


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

end of thread, other threads:[~2023-07-14 20:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12  8:11 [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients Krzysztof Kozlowski
2023-07-12 11:58 ` [PATCH] dt-bindings: hwmon: moortec, mr75203: " Farber, Eliav
2023-07-12 12:07   ` Krzysztof Kozlowski
2023-07-14 20:45 ` [PATCH] dt-bindings: hwmon: moortec,mr75203: " Rob Herring

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).