Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2407615rwa; Mon, 22 Aug 2022 07:16:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hPZp+0v0FYWZe+w2S1pu1V7v6Zen/i+q+qbbQ7OqHlRkbwWQ4oSJIIrcQ5w81OCJOM9de X-Received: by 2002:a05:6402:4441:b0:43d:5bcf:afa0 with SMTP id o1-20020a056402444100b0043d5bcfafa0mr16331353edb.91.1661177800463; Mon, 22 Aug 2022 07:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661177800; cv=none; d=google.com; s=arc-20160816; b=AiFfVL1NvNVgVpzGICCimE7Ot1tnRAMAvTdFy1hQUbjyI0yJJRDhRHVHIAV1Hd1zmT ZLzeJXsi8TaN9ndtQ5jLWSZbo5OVn6SP+erKqi6AKK0mSZhGX0fuS2sApljbF7ApQoMC Zlt7WrHvHQ21Cb4838TKOY5FTh/IGyZzKx8bzLqc52mPjL/FryxDEvWBOOLZOykBVG8u EYN9WN5wmDqtiBoQDa6GJ5NfTf7OuJNVyGF3B/PjHlf94Bx0TSlq+XLlW/KHxtLf+oIr w7Z64795bF4RK+65jhmVcv60qlyPgn5tGMvkXIe5AQUc6pwUX0Vebt0Baf3qClPnWAhx ZRGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:user-agent:mime-version:date :message-id:subject:dkim-signature; bh=I0ZGvHTbcv2oue53quGLVQQ+Ds1q2EaIxM9IzfK2BPM=; b=xE+uK3/ayv5N67INweNac0frqTgriTT2+FchJ6IeUQWbZtlphbzLCuVXEyG8O1kJnR 3groIiARmMiZ7l4W7RHDyDZa5CJxrOz5p5KEduSihCgHYDdHcoHkJ3VipKmP+lcRKCqz gDGZqtfxb9yAz60jQtwG5TnWS1qOnZtI0xg58Ux+BI0fmhRCLg/Gpy2PmEn19axd0QF6 exbngJPurlZ9QqnqIAFFprYDv/P6nblwWK04zubNGh8ZhKLmUZJPhir8A3jQZgz+Gfy8 +9FDNu7YuEZPuyNuqUVKADYlJWS1MdVPrb7Wr93D3xw4AFSRzgFt3h29sI3zPp0mYY4G ZhEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=efZKBa9m; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a170906360800b007387740b9c2si2180582ejb.2.2022.08.22.07.16.10; Mon, 22 Aug 2022 07:16:40 -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=@amazon.com header.s=amazon201209 header.b=efZKBa9m; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235264AbiHVNla (ORCPT + 99 others); Mon, 22 Aug 2022 09:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235151AbiHVNl2 (ORCPT ); Mon, 22 Aug 2022 09:41:28 -0400 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D56601835B; Mon, 22 Aug 2022 06:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661175688; x=1692711688; h=message-id:date:mime-version:to:cc:references:from: in-reply-to:content-transfer-encoding:subject; bh=I0ZGvHTbcv2oue53quGLVQQ+Ds1q2EaIxM9IzfK2BPM=; b=efZKBa9mqMULv0sh33pXNQRAvXz06Lp5YWH2MfHWtwBWhU2XnkiXpVMU VPrtjq0B0IvJ+WPTC7Qq2cHPqUPd4v5iIXX4RBcFAMuBhgRbxknwNqvJS UYvPO0yPiH+XNwSTCye9TGoVJ/ELwha9gdGEw3nQEQ1Irz8jz2XanHIfe w=; X-IronPort-AV: E=Sophos;i="5.93,255,1654560000"; d="scan'208";a="236024413" Subject: Re: [PATCH v2 14/16] hwmon: (mr75203) parse thermal coefficients from device-tree Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-7d84505d.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 13:41:14 +0000 Received: from EX13MTAUEB002.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-7d84505d.us-west-2.amazon.com (Postfix) with ESMTPS id DEE4F9A4ED; Mon, 22 Aug 2022 13:41:12 +0000 (UTC) Received: from EX13D08UEB003.ant.amazon.com (10.43.60.11) by EX13MTAUEB002.ant.amazon.com (10.43.60.12) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 13:41:12 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D08UEB003.ant.amazon.com (10.43.60.11) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 13:41:12 +0000 Received: from [10.220.236.67] (10.220.236.67) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1497.38 via Frontend Transport; Mon, 22 Aug 2022 13:41:08 +0000 Message-ID: <20200e60-c4e2-d272-1417-005994766380@amazon.com> Date: Mon, 22 Aug 2022 16:41:07 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Content-Language: en-US To: Guenter Roeck CC: , , , , , , , , , , , , , , , , , , "Farber, Eliav" References: <20220817054321.6519-1-farbere@amazon.com> <20220817054321.6519-15-farbere@amazon.com> <20220818202839.GA3431511@roeck-us.net> <20220819113842.GD3106213@roeck-us.net> From: "Farber, Eliav" In-Reply-To: <20220819113842.GD3106213@roeck-us.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_SPF_WL 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 8/19/2022 2:38 PM, Guenter Roeck wrote: > On Fri, Aug 19, 2022 at 10:57:58AM +0300, Farber, Eliav wrote: >> On 8/18/2022 11:28 PM, Guenter Roeck wrote: >> > The calculation was just changed to use new defaults in a previous >> > patch. This patch makes it quite clear that the coefficients >> > are implementation (?) dependent. So the previous patch just changes >> > the defaults to (presumably) the coefficients used in your system. >> > That is inappropriate. Adding non-default corefficients is ok >> > and makes sense is supported by the chip, but changing defaults >> > isn't. >> The calculation was changed in previous patch to match series 5 of the >> Moortec Embedded Temperature Sensor (METS) datasheet. >> In our SOC we use series 6 which has a slightly different equation and >> different coefficients. > > If the coefficients are different based on the series, it would probably > make sense to create a separate devicetree compatible property for > series 6 > instead or requiring the user to list the actual coefficients. Those can > still be present, but the code should be able to use the defaults for > each series. There is a different set of coefficients for series 5 and for series 6, so it would make sense to add a single property (e.g. series) instead of adding 4 properties, one for each coefficient. But that would not always be enough. The Moortec datasheet explicitly says that coefficients can vary between product and product, and be different from the default values. That is the situation in our SOC. The coefficients we use are slightly different from the defaults for series 6. So just adding a single series property would not be enough, and we would anyway want to have the option to specifically determine the coefficient values. Do you suggest to add both, also series and also coefficients? (and I can fail the probe in case both are set, to avoid conflicts). -- Thanks, Eliav