Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2418556rwa; Mon, 22 Aug 2022 07:26:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6KXPlFBq5X4JXiiAS4WJKehXwcjMvsdoWr1BqslCqY31FKdymsBcNrIsrUlLqczK/PWvpe X-Received: by 2002:a17:907:9686:b0:73d:1de0:7fbe with SMTP id hd6-20020a170907968600b0073d1de07fbemr10149887ejc.500.1661178401733; Mon, 22 Aug 2022 07:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661178401; cv=none; d=google.com; s=arc-20160816; b=TDMEnfMEhhwmm1XiENeIoK2rjcIzJxRNBL2mNYCToAmaV2qeoK5nTxLab7n+QrG3jb 12Rv9Cj61GkKX7P6rnXRoV3RKeySlKsQRETxyK54XBMlh52uxr5zzzeenAi9n7WRyHT6 ZLUbEZwhfcg02vSPRnIZyt5HFGQDLS+OZcAPFb+bfyJM49fnxZB3j6RbcxgeuTr7GM29 OIMkHvEMIgYAdM6yl7cJrdfeNJEuj1pPo9xinxQvQJ6YIQFSz1ZEiTeTCiU4Bii798Yr /J3bTjvVhz2fxqVZn0Jk6iZ4+n/C1qM10wOElNCv2YPiy4CilkNte8vh4i3bLb4rwYzU PHVg== 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=23Pw7AtYUTUUxaVyavtOrUwHZ9/LNGw1p2Y9Jhcb9RA=; b=IVyzbyITNV4jS0LrTcx5b1pVeUVpXK4p4GCbp0e8/xrckCr56q6Li9TiBsmzMHPro3 Z46YrlXkaEyzOLNGZfercjaFWqfKf51N95EpKWPuUs1LzbctdoJR0t0FZhhr5Pe8YtXO 8TnIU1YhGHaVz6Xvoypn8kclTouoH2Ij1Pk/jX12MyrdEa1lmVNAuj9ZKLmNtUP+RD0z kfaWaaRNw/8u5mojvl43N9urt/sSZ7PacJsQUg53hTogpPwPwz/OBitUXmNWUMd1EYe4 RnhLw0zLsCmntotE1hvlAo5QDn+/YzlE3IpUDojR0xHfrW7LK1HXi/4UQVXF852NJGSY SglQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=a4Y2bPLB; 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 o22-20020a170906975600b0073d6f4d44f4si4941287ejy.862.2022.08.22.07.26.15; Mon, 22 Aug 2022 07:26:41 -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=a4Y2bPLB; 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 S235519AbiHVOBb (ORCPT + 99 others); Mon, 22 Aug 2022 10:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234651AbiHVOAW (ORCPT ); Mon, 22 Aug 2022 10:00:22 -0400 Received: from smtp-fw-9102.amazon.com (smtp-fw-9102.amazon.com [207.171.184.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BB4B2DA9F; Mon, 22 Aug 2022 07:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1661176822; x=1692712822; h=message-id:date:mime-version:to:cc:references:from: in-reply-to:content-transfer-encoding:subject; bh=23Pw7AtYUTUUxaVyavtOrUwHZ9/LNGw1p2Y9Jhcb9RA=; b=a4Y2bPLBrzyLCljjwj57hmTK/AONPeX+jYYUXIJwuzy1o3YTwVOu19ac Qi19rfkoZOh7HJO2vNbGhvMSMTk3ED37sYygaufuwtr4NLrKk8Zuc0HO5 4e2LZ3sW4/pkNpzsNzTLBjFBo2iuZ7Q1XfPZOZHJQErngvZosQcd9cf2u I=; X-IronPort-AV: E=Sophos;i="5.93,255,1654560000"; d="scan'208";a="251617938" Subject: Re: [PATCH v2 16/16] hwmon: (mr75203) add debugfs to read and write temperature coefficients Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com) ([10.25.36.210]) by smtp-border-fw-9102.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 13:59:51 +0000 Received: from EX13MTAUEB002.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com (Postfix) with ESMTPS id C1DBF3C008F; Mon, 22 Aug 2022 13:59:48 +0000 (UTC) Received: from EX13D08UEB002.ant.amazon.com (10.43.60.107) by EX13MTAUEB002.ant.amazon.com (10.43.60.12) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 13:59:47 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D08UEB002.ant.amazon.com (10.43.60.107) with Microsoft SMTP Server (TLS) id 15.0.1497.38; Mon, 22 Aug 2022 13:59:47 +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:59:43 +0000 Message-ID: <75165e58-8601-1fe5-7bdb-98761a73701f@amazon.com> Date: Mon, 22 Aug 2022 16:59:43 +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-17-farbere@amazon.com> <20220818231106.GA3505191@roeck-us.net> From: "Farber, Eliav" In-Reply-To: <20220818231106.GA3505191@roeck-us.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.6 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_HI,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:11 AM, Guenter Roeck wrote: > On Wed, Aug 17, 2022 at 05:43:21AM +0000, Eliav Farber wrote: >> This change adds debugfs to read and write TS coefficients - g, h, j and >> cal5. >> >> The coefficients can vary between product and product, so to calibrate >> them it can be very useful to to be able to modify them on the fly. >> >> e.g. >> >> cat /sys/kernel/debug/940f23d0000.pvt/ts_coeff_cal5 >> 4096 >> >> echo 83000 > sys/kernel/debug/940f23d0000.pvt/ts_coeff_g >> > > What happens if you write 0 into all those attributes, or 0xffffffff ? The driver equation is: T = G + H * (n / cal5 - 0.5) + J * F So I added protection for cal5 not being 0. Besides that there is no limitation on what these values can be. I can't really think of any other logical limitation I can apply. -- Regards, Eliav