Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp438856rwe; Wed, 31 Aug 2022 05:32:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5b3ZyjsZcxVDGVVaJINAuUx+EftBad3H4dAaFigpc4bu3X0KQ8+WdJtns0Kj58Ko2G2nQu X-Received: by 2002:a05:6a00:e85:b0:52b:5db8:f3df with SMTP id bo5-20020a056a000e8500b0052b5db8f3dfmr25909757pfb.14.1661949169770; Wed, 31 Aug 2022 05:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661949169; cv=none; d=google.com; s=arc-20160816; b=EkxkYqSKwYczniOtFzlIfc/8/k+ZA0btFV2NfbzelHtomdACRUBtIdnnlmXRvr+zXh mWUhgtZSdiyB881SuTJcvJzFZrKplUiNTJrZrbV6wRqXBSFLBsDO9chNfcUG4KkXhEcf YEMt1ZnfnARgfXUK3/Ma6ELV5cARSEiT0aDS7k99M/qUp8Ad5vsjJ9Ye4O6ULmxMIwME bIc4szxlYsG0DP1lFrvxt8HatAcMdgMY9LEqyxCTIpqsWsqKTTa9xzrBQ/8TLmI24shr vreJXhcmh+1g9Jx9G6iUZVzg9AfvTbbJqwpGrEgGMhW/sNhBMTUhIhKP++Rx6myiKqbs XhEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=O0HpD/KNji6nOz+X7mO5/JNGQSB57I0QEn1a/R39OqA=; b=kcUNnyYwyuu4e9ABb/AeKX5O4Se699REWeMjt8/7DR0mwQpQ9WFrxnVvF3NqtkSWM2 6BIuX5zTWCpbDcsGXNhbaDMWKiSnvF6p0Bvziqv/7mfPzV2euNsB7X4Gk3nu+eXGa9JC n1BVpvlq3ju5misCRFwuS1EeTalsxAdfiXjXZPpf5M2uAeWX9jufsINg1MrM+izbrUue goKSH9iCkaY4Q9xizJ9z45hQIfd/x1eRTJCuL2GobF4XonekaKitXvXE941VWyLRlrHN a1zmXa5SBpAtktZ9Be7R9GaWV/ciu4K5As6Us2/fOx/C5JbDcUtcIJb9GvXdnOzx2nMQ +xDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RGbMveID; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020aa7888d000000b0053abe946910si1733681pfe.349.2022.08.31.05.32.37; Wed, 31 Aug 2022 05:32:49 -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=@intel.com header.s=Intel header.b=RGbMveID; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229570AbiHaMGi (ORCPT + 99 others); Wed, 31 Aug 2022 08:06:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiHaMGg (ORCPT ); Wed, 31 Aug 2022 08:06:36 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D0F21248; Wed, 31 Aug 2022 05:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661947594; x=1693483594; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BGu3/5fG8xHIe5yMcSH1ib5RNNwENF77HYJJciCvzEQ=; b=RGbMveID76jBMxC0Kqw6DRgFQvH7lMaNJoP42pb+BoK3LOy44gdWlHKM qDKJ/dFtefBe8ounM726gqTqAXFUq2tFLqwO85aEDztEP060i/VBsmWB+ bBs1P8VC5AmthbvdwfHHJ/U1jHuuMY27uUhkyJCQ/FrSkxw+k2XhkUIM3 /NEX1kOTOMjvL+wc3w2+XwXQaG/+Z+4MIztKEAqYaZgPCeh1BHfuSQhXw lqesMF6YLFju1d9lDf8xD+csTF9o47JHBUtY+6FKqkb6qVu/sEyjK3wRf 4e3hkJQuLuRqix7CM0IWCQt6oDNkZ356b1B9qeQQjkQfKPfG5kNIDsuVR g==; X-IronPort-AV: E=McAfee;i="6500,9779,10455"; a="296216014" X-IronPort-AV: E=Sophos;i="5.93,277,1654585200"; d="scan'208";a="296216014" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 05:06:34 -0700 X-IronPort-AV: E=Sophos;i="5.93,277,1654585200"; d="scan'208";a="680402279" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2022 05:06:29 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oTMUE-006MbU-01; Wed, 31 Aug 2022 15:06:26 +0300 Date: Wed, 31 Aug 2022 15:06:25 +0300 From: Andy Shevchenko To: Eliav Farber Cc: jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, p.zabel@pengutronix.de, rtanwar@maxlinear.com, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, talel@amazon.com, hhhawa@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, ronenk@amazon.com, itamark@amazon.com, shellykz@amazon.com, shorer@amazon.com, amitlavi@amazon.com, almogbs@amazon.com, dkl@amazon.com, rahul.tanwar@linux.intel.com Subject: Re: [PATCH v3 13/19] hwmon: (mr75203) modify the temperature equation according to series 5 datasheet Message-ID: References: <20220830192212.28570-1-farbere@amazon.com> <20220830192212.28570-14-farbere@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220830192212.28570-14-farbere@amazon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 30, 2022 at 07:22:06PM +0000, Eliav Farber wrote: > Modify the equation and coefficients used to convert the digital output > to temperature according to series 5 of the Moortec Embedded Temperature > Sensor (METS) datasheet: > T = G + H * (n / cal5 - 0.5) + J * F > > Where: > *) G = 60, H = 200, cal5 = 4094, J = -0.1. > *) F = frequency clock in MHz. > *) n is the digital output. > > In code, the G, H and J coefficients are multiplied by a factor of 1000 > to get the temperature in milli-Celsius. > Final result is clamped in case it exceeds min/max thresholds. > > Change is done since it is not clear where the current equation and not clear -> unclear > coefficients came from. ... > +#define PVT_TEMP_MIN -40000 > +#define PVT_TEMP_MAX 125000 Unit suffix? _mC perhaps would be enough. -- With Best Regards, Andy Shevchenko