Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5015744pxb; Sun, 6 Feb 2022 10:40:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJz70kbnVI95etZwI9/+AImfRi7LXxwFWdm2Mm/e8O+6eBy3gu1Vo4/v2CBptRyHysDZbl4u X-Received: by 2002:a17:907:2ce5:: with SMTP id hz5mr7304505ejc.480.1644172802685; Sun, 06 Feb 2022 10:40:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644172802; cv=none; d=google.com; s=arc-20160816; b=B0ZxEOFX28vlpO2tIuIRVNVL6J/3xFnfLHy/x3TwEf3Hm3rQuGtq63xMrJo2ElzXSr PztRdfyEO6d49C9ajcCiTNuss61u2kOg1tHKpKSLyaIrzcnqSGNby4ZrTSIiGaaNoVxe EogYUPvSaXm/WiF4yZWPg8gWGdFIFlC4guewoREetdmjxgnZOEu4ishhJKZPYwOTsqGC uc0ibRwDdRptcGPvP9prdD+4VR1roAKOUA3fhmCgB/BbYzM8KnPNxYKNx8lwJw2WbqAK xWY9AI+ypwyAhHbi34S87ppbb2HNWbgQfSNuKmLtbBgjr15Pc9k7NbtuU2Jrm79yG/n/ 5w7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=hljRiwUaJx2liFaatlBcu9XFcu5/tSdIbOS8E9f9SGI=; b=nDdwkhG8Xh/LgrBW6KLgmts0XxpT4Xy1e1BOri8H6ih0NNvLLYEhriQ1L4U2p/ZQeG BMIcCs3Rk4tOy0mi/32PJ/OarMmCNqM+kD/EeAZAzU5WvZat7sKYP7/IDvuQZFhVmoZr vyK0heEmMSMeRsOlg9HpLp3IUUEnfuq8i/YSwxA5vPoPOG92dXqUqlRkML8re7MztkqW pCziqpQ1QFN3QCTMMcFG1wJ2wwndwigbXHPemhIGSv6G1mFTrVmjFUwDGWWcn31Bcjd/ aIU72bd9OEQSvpBQhI5LXqCnuFL1Yas0CGT53jNaFyETJuFpC6n5fb8OBR/mZLtLYAXv Q0xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m3DxUyXJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb34si6385289ejc.932.2022.02.06.10.39.38; Sun, 06 Feb 2022 10:40:02 -0800 (PST) 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=m3DxUyXJ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380867AbiBESX6 (ORCPT + 99 others); Sat, 5 Feb 2022 13:23:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239916AbiBESX4 (ORCPT ); Sat, 5 Feb 2022 13:23:56 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D794CC061348; Sat, 5 Feb 2022 10:23:55 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id st12so4579080ejc.4; Sat, 05 Feb 2022 10:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hljRiwUaJx2liFaatlBcu9XFcu5/tSdIbOS8E9f9SGI=; b=m3DxUyXJ4COw4ctXg46SjnWBzhy9ruHWy3IU0xJw5i73uhbAgQtKXqr1M3nM+Ue9B9 r0F+nqvCecE9j4qe5ym1utGedfl2WssmKCtl0qLOWVjPZB1titxt0XeEpWLSxshHsCpa 3ux9lbn96pCStJY25KstP9Ab7jlOyEF8PPxE5ZVEXw6mlnm4iIKTse8WPKZbHg+UTRBo 15VUQgtQ4JlYpKlHwrWbfX5iVei0Qk8zeW+Bm/ubdnGQETEU6zUAsor+fBIJw/GiUs6W yaYI8uCPqo1koAnQ6KYjyFTk+OPVYQ3SlPokg04cAH5YU95P3edSAwjO/zGP9h3Ez7HO wk3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hljRiwUaJx2liFaatlBcu9XFcu5/tSdIbOS8E9f9SGI=; b=tg87tnKuZU9Ge30U1Vgf8rno1p+aE2bcMpmsRZjhdmH+j3b9yA9j77t8zVkmKt9vhn O3600oSeyZwBBFK8nv5OaamgyB5EayKFsAbWGmT1ad5H7R/FTrdQM+8Y69ElKbcKAXwr xnrIyqVg8EkgzlGCBoO/BJdphZMsdLtJNYIyHShqVPJ+ysGTYnq4Bz+o6me8MQD/2tZ5 ZYy/HjCW6zvbHLEfx1tKFocu++DQ4qziXXL/0Uz8Ly2ItsUrqrnffAhD/sPGvpeyLQ0C AEShJmMg3X3PLayUys0d6oi58utBeGjjSjZyNCnbuKxDvjd+DGdGCiSV0I1Zptf8GjZc TGkg== X-Gm-Message-State: AOAM532IFajV3l3nvkEHVsXyjbFwKRNUqFHChh9tw1+GYGf3XGphhVLl oYh+GS1XKK4y7Ap5HmWulmglqU3YSRqeKSuhmWgogjDOR/g= X-Received: by 2002:a17:907:94d5:: with SMTP id dn21mr4056889ejc.77.1644085434229; Sat, 05 Feb 2022 10:23:54 -0800 (PST) MIME-Version: 1.0 References: <20220130161101.1067691-1-liambeguin@gmail.com> <20220130161101.1067691-7-liambeguin@gmail.com> <5da96dc7-696b-1bc0-a111-f6108ecfa54c@axentia.se> <20220205175404.451c5c56@jic23-huawei> In-Reply-To: <20220205175404.451c5c56@jic23-huawei> From: Andy Shevchenko Date: Sat, 5 Feb 2022 20:23:18 +0200 Message-ID: Subject: Re: [PATCH v13 06/11] iio: afe: rescale: make use of units.h To: Jonathan Cameron Cc: Liam Beguin , Peter Rosin , Lars-Peter Clausen , Linux Kernel Mailing List , linux-iio , devicetree , Rob Herring Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Sat, Feb 5, 2022 at 7:47 PM Jonathan Cameron wrote: > On Tue, 1 Feb 2022 14:28:28 -0500 > Liam Beguin wrote: ... > Not sure if it would help but maybe it's worth a local define > of something like > > #define MULT9 1000000000LL > to loose the association with any particular SI basis and > just indicate it's a bit number being used to retain precision > in some maths? Would need a comment to stop people sending > patches to replace it with GIGA though ;) > > My ultimate preference here is for whatever works for Peter and > Liam as the people who are mostly likely to have to deal > with any changes to this driver in the future. SI multipliers are for values with the physical meaning. While Peter found them confusing, it's a pretty much win in my opinion when we talk about data from nature. For the pure mathematical scale it may be confusing. -- With Best Regards, Andy Shevchenko