Message ID | 20230712081124.110345-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp989957vqm; Wed, 12 Jul 2023 01:14:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlH6aCD0BiYVCvtk/PnTOAhhc71QoRC9hThDOAlK0vBlRnphdoPanBzHbt6dKY4JgwtglttP X-Received: by 2002:a05:6358:c1b:b0:134:e40e:b6d6 with SMTP id f27-20020a0563580c1b00b00134e40eb6d6mr14805804rwj.6.1689149683337; Wed, 12 Jul 2023 01:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689149683; cv=none; d=google.com; s=arc-20160816; b=osJ7KquJlhFrFnsU2yT5r25jiaXHagSIES8AkMJ23HLMEk2ZEAHncvgX+2NTfKsV1c p/xqUGrcbOrJjEdnvZmMrVCuWt9T9LuZMOoHOyZQMyGOOQb3FhMPWtcNeUzKgO/V5sFQ fKYVVJ2GbaQPLJgXzG2BndJnXMc0Y6OK0Gb6pFvgCPGKBTxZcy8HP4Q9QEnInmS5C/gk n/vLZB+bq3weD1yaKiVlMFe+lhRuTmHeJ4uHqhOPZ9CTQwBCcCib4DXw6FH8WNJisQj6 iotKVvIF2WRB/nIFaLzsXQjUhg7k82TG+2tBbb7k19UY46yMNHLCz0+zuOUzWWCckEfb sr5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jHkdHjFrM5AfGKbyzbpp4QoR422wNpy9DNc8+HlwIYs=; fh=rrDt6n2fatZu/3xzB8eTqi9t+fEBvB61UyFy9FwaQIE=; b=xNtVW52Y9iLU1Pr67ke9z3AmQ+YjtPxtrErlbMxCBVrMmGGdNBnwDMpDjiPVmwVr7Y oTuqjYDIYDZH4a0H75FR4ziMr+I5dMrdg7j59n9eV1/gqQ3P15x2xV4DdoYjrejIDVPF RCToti3MVkZiDSIiCgMz8nQnOSXtgF7lyRPc6cHKNS3HwdOGAnHv41BjD7q5VUC/fQfl SPQeUkOHoHForiSB+zjS2aCMidj3ULXKl5FotrGMcGMawq3VX9UWNwy+pvRk6a8vsHV6 vDKI2VlsGIOfWj0h0R+0yogRuWEOR5Vb9vqzxyNYlOSyyAQdSQI1vPWj9URBg50MoN+o ZU4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AzJbvXxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o3-20020a634e43000000b0054fe43caa81si2715827pgl.782.2023.07.12.01.14.29; Wed, 12 Jul 2023 01:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AzJbvXxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbjGLILd (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Wed, 12 Jul 2023 04:11:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbjGLILb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 12 Jul 2023 04:11:31 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C61D10E5 for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 01:11:29 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-51e28b299adso8865515a12.2 for <linux-kernel@vger.kernel.org>; Wed, 12 Jul 2023 01:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689149488; x=1691741488; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jHkdHjFrM5AfGKbyzbpp4QoR422wNpy9DNc8+HlwIYs=; b=AzJbvXxgl40Rh5LpkFIrmNi/6CwG7cp23unkfzcyCmTh6Vfe+T7HaKu0u8e6ykzg8z 95T0Ho47gQFvBalUnsu3IHe3eFf2cX0jj/hlHVrQjRdVT2IFsSGObXP+3s21P0MlcY3k jy/JBDKyKvq6v55fEeFaOAkDNM9jyuyuhB5md3cx1GKu2WpkcHN2gtUH1Bs/pZNq5L8j 1DOyiNXPxUGruMBe9F0xnub1wQKKSLACgevYyxMUQmHo5JATS4U1iHcswqNQcq01J4TU y5bJJhyil0rBNkljL0YPehL6poUpoO9/hKvmRsC4IR6EeC3Idf0i1LpZtbUwOS2SuhON LM+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689149488; x=1691741488; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jHkdHjFrM5AfGKbyzbpp4QoR422wNpy9DNc8+HlwIYs=; b=KEXULaTGvRLBJu0E2z1qMclH4yYc2LWwZrmgngIRnVDBe0bpJjOU4xOjLHF8SRpG2o 0DFvfrstmuVjdsC38VJrlXCpHBismwN29Kp5wYDZAc+cH8W5KX/93esr1AoN1wuKgM2m PlWuDGat9N2yKzrwRn4qYi93VHqnlWjsSj/HpbmH8dqO+//UHBLca8/JPiCUiJlxGoCj 5Ya5NwvCTyGgeBD3UE2xQmNiz6+gGR/UgUuXsOGtIP7HY3GuU8QyzPg1ptZs47s3+UiS LMyJka5WozPRNOoxM2+sDk9de4JTy9bwf3SK9kcannuCqZhkR9di2cLWQ7x7DAizzcb6 Pm6A== X-Gm-Message-State: ABy/qLaGs35Mh8OQU5CmPSJZrU6qi1s1UuI9znuWdoZRE7PkosmjCzUW tJ6qFHiiHXgHRt2C6i/0B720Ig== X-Received: by 2002:aa7:c544:0:b0:51e:1bf3:f4ac with SMTP id s4-20020aa7c544000000b0051e1bf3f4acmr15556921edr.27.1689149488039; Wed, 12 Jul 2023 01:11:28 -0700 (PDT) Received: from krzk-bin.. ([178.197.223.104]) by smtp.gmail.com with ESMTPSA id t3-20020aa7d4c3000000b0051d87e72159sm2368024edr.13.2023.07.12.01.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jul 2023 01:11:27 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Rahul Tanwar <rtanwar@maxlinear.com>, Eliav Farber <farbere@amazon.com>, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Subject: [PATCH] dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients Date: Wed, 12 Jul 2023 10:11:24 +0200 Message-Id: <20230712081124.110345-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771201818488456610 X-GMAIL-MSGID: 1771201818488456610 |
Series |
dt-bindings: hwmon: moortec,mr75203: fix multipleOf for coefficients
|
|
Commit Message
Krzysztof Kozlowski
July 12, 2023, 8:11 a.m. UTC
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(-)
Comments
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 >
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
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!
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