Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5528777rwi; Sun, 23 Oct 2022 07:34:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Ansipz81nW8WheQ+NydFci5+pJ/Bjhp2uInxvH9zCtLF3hCnHwhjTJ0PIOjP+gGBHgVEW X-Received: by 2002:a17:903:22c9:b0:186:5f78:44af with SMTP id y9-20020a17090322c900b001865f7844afmr20039699plg.138.1666535667614; Sun, 23 Oct 2022 07:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666535667; cv=none; d=google.com; s=arc-20160816; b=EYhtva3TPlESCEW2Usl8iAym1ZHOJ7hZ2bu4DLAkTSK2lkjDoarYPHyZj6Ei8u9+8d xtf7tAOtxea0X7xxgtipLyB++Yt4inXyCxk2l48C1jDYgHWJrsN1qq2Z9zNUJZi+Uwnw s1jYSlOY02Bj5kLigzpiSUiXkiSYRThEQ0Y153ATVk5r3f3ir08PhRKrxJxLcgLkYgmL yR4At1seOkZHWIW2MCCwNNarspGwyFDUuPbWJmGzXKlchplnd89sdPRLDxhS98n27L5r N6JsrGd50BE10B1jQN/LLedCWzxjGYlMS8gqpAPAaXTUv1B26o1FfWNeNLPxFRsf+GVt V0OA== 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:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=ZTAAkkj/PEqEYXCHWGmASpbHjy0heS6WaXHLTcNNRCQ=; b=A3g9yzI2R6fq7MqDUCLB7PuyaXIUeMMEzbpPFWs6Yz1yV3xWYxNYc7bChERenVrV/o SGCEcgUDz/fOin6GuZc1iEXcu0pE9Mg6fiZe1e23kvI5JNZG34MKTi87bi2tHKZnLHSK w4w7o8zc+xvtMpJnCobzEuQoEmYY1uSUuIzzyWEv1p0xoxpM9ohz+RZ64nyXiNWt041k Kn8JTUFxsziNEui0KpDkzQnz/lexVxFITiIYHu1PnI1IZPhgMJfzrURBM59+vzrlEtIl T3RlEmY6tEOKV6wp/mfrNn1a2NU0rXijlJNtageN+AY6o9XAgo4swdUpQ0rsxksW4W35 FBqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=c5LDdOqL; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa9-20020a17090b4fc900b00212d06b4743si5867099pjb.34.2022.10.23.07.34.14; Sun, 23 Oct 2022 07:34:27 -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=@gmail.com header.s=20210112 header.b=c5LDdOqL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbiJWOV2 (ORCPT + 99 others); Sun, 23 Oct 2022 10:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230125AbiJWOVY (ORCPT ); Sun, 23 Oct 2022 10:21:24 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 600BE50708; Sun, 23 Oct 2022 07:21:23 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-13ba86b5ac0so636672fac.1; Sun, 23 Oct 2022 07:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ZTAAkkj/PEqEYXCHWGmASpbHjy0heS6WaXHLTcNNRCQ=; b=c5LDdOqLDCIMz+hCtZ8Owc1PLjcqMDkHRloTKXi50u5M5blkov+LBRqMLilT02pSgI AhJyQizNqnNEtQvsUUay4+PkblK+Es0xSgH/TF6V3LjAkkOvOsfWT46CLc8epx5dGXry G5vAtRLLu6D/wR8M5jW1b4jbhb6yTPwFvdjhD/O+8qKyPyseVTQkirg/509O+wZ5YTP0 eDjiaLW93Jzydpakl26NeGO9jqDyT+9fgDsDKcEsUCMq4rDvLNm5Z+90qk2E9N0mDlkk TRv+sEz2tTqodsZxRcqg8axZGlV15FTUUQJxKI2pPQmQGItPBL8zhgHjL/xp3Um3ivcF rQNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZTAAkkj/PEqEYXCHWGmASpbHjy0heS6WaXHLTcNNRCQ=; b=A9rUBZj9N7x2idb1aVFoTuMsjKvzWOhnEbfdK0pzca+5Y3stBx0VJIymrL6o8C44oI 1JwyPqmL2QLUiRA1FF8ngEfOZMDbZstnO9XdmmChWJuxsle4O0cWH8ord12/bSoGRl7n fFngr+6ehAVeAsUFDSGLt0vbdxZFDcjO/9HV/OURJrBaYF9zUCikanZ7Myjm4yPUxS9H A9gImn6/IVHDL19nNn35lRb937FQ0RoJ1T7KFowajWRIik9KotM7JMrA+5cubzitsYiN 8jX4gqUyhIvT4X8qdW90SyYiNV2JkgqSys57f5Fy7pDH3mgzRCKTWIZJ1d5+fexIJEQJ IhUA== X-Gm-Message-State: ACrzQf2hDphTmDBnX/Cn4DLMNwMx/uE8E9V0HtvIzTG5z4OWOcvF0EQB EQhmVz98saeHBnmmbavq1Og= X-Received: by 2002:a05:6870:3126:b0:132:7416:cb31 with SMTP id v38-20020a056870312600b001327416cb31mr18368629oaa.140.1666534882683; Sun, 23 Oct 2022 07:21:22 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id w21-20020acaad15000000b00354932bae03sm2565450oie.10.2022.10.23.07.21.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Oct 2022 07:21:21 -0700 (PDT) Sender: Guenter Roeck Message-ID: <1d052998-9ac2-2d4b-927a-06e0318eaef4@roeck-us.net> Date: Sun, 23 Oct 2022 07:21:19 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets Content-Language: en-US To: Aleksa Savic Cc: linux-hwmon@vger.kernel.org, leonard.anderweit@gmail.com, Jack Doan , Jean Delvare , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221021174834.736930-1-savicaleksa83@gmail.com> <20221022135720.GA739650@roeck-us.net> <6ef88c2c-3435-8847-0f4f-53e81cd3af5d@gmail.com> From: Guenter Roeck In-Reply-To: <6ef88c2c-3435-8847-0f4f-53e81cd3af5d@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 10/23/22 06:15, Aleksa Savic wrote: > On 2022-10-22 15:57:20 GMT+02:00, Guenter Roeck wrote: >> Please go up to 100 columns to avoid excessive line splits. > > Will fix this and other comments in v2. > >> Is it really necessary to re-read the control buffer repeatedly >> to report this value ? I don't know how costly that is, but unlike >> the pwm value I would not expect the number to change. > > Yes, aside from the driver userspace can also change settings on the > device using hidraw and we'd end up with stale data. Reading it is > very fast, it takes about 4ms in my testing. > >> Also, is this number indeed not included in the regular reports >> sent from the controller ? > > Unfortunately, it's not. The sensor report only includes final (calculated) > sensor readings. > >> The driver doesn't distinguish between offsets in the control buffer >> (pwm, and now temperature sensor offset) and offsets in the report buffer, >> making it a bit difficult to determine if those are the same or not. >> Some explanation in the driver would be nice if someone finds the time >> to provide one. If the control buffer offsets are in a different number >> space, they should really be marked accordingly (for example with a >> _CTRL in the define). > > I can see how it can be confusing. After this, I can send a patch to > reorder the macros & initializations and add more comments regarding > what is what. > Please do. Thanks, Guenter