Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp545348rdf; Tue, 21 Nov 2023 09:19:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEM1/D1efskO+oLBCEZGPT+sRRhMB9wqH2707NLnMawQ6/VN4LolYokIyDZIq7ZCjzkB9K X-Received: by 2002:a05:6a00:6c8d:b0:6c6:a139:eabf with SMTP id jc13-20020a056a006c8d00b006c6a139eabfmr11091877pfb.3.1700587141240; Tue, 21 Nov 2023 09:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700587141; cv=none; d=google.com; s=arc-20160816; b=pCyxVf00c8xcg6hdHRWalhd7QNyJ0k7Kvc2KAcJ/cetRu+mFG61jNkXW21UKR1WIxF F0cAvBg2zKiolX4GNswj1QFgPUHHNMwibZ8U/9ISEydvISp06JCWhrzvy7VIjFXQxang L/qDI5RYGgbirMTuuEXHQTRAhIQO3NeuZrxADWoFoxH3wqHFSed1j0OLElb+N63wmYg5 qD7y/9jPzrHRIQBoeYBc43nKPCMvaqsb3SvZsrZ1JdayOUfFhk4h/kY18m1zwsNqrLQ9 B84YmBilKd/b8ucEYwrDps+yywPmIN8u7UDSzkz5R5p73f5Qgl3Tl9jwrKK3BjN8PvKZ 1PsQ== 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:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=swhdhjkQ4NCZZT2+5iCdL+NEq1b8GxVa0Me/RJxD8Hs=; fh=BGWPup9pQEPuzc7wRpj8/AOlqamPTM7v3TjTez+c4LM=; b=V+bvYL17wp0nNygXe6mlU8yPpBJo0XyCFR8/OE2jGPuJ9Q8kGmi0xeetPArGYkcsCU qIfO7Jf9S6fQi9BXfMLylbEVEDdkH3+GFtInXujFf5sLFU7Be0cDCRZacZO0LntkUiuT 7Q6R/OMt9ndnoKTwjQ0BUFIJSF4QUJ/mf58U5yoB9snVR1PoKSRilFoHKPI0VSVUZXkX lQNL+d2qf2fZVU+K8CfiAd6aKspDdP/jn5fcMs3zsPwZKCAyGt8Z3xvSVPxI0F9suB7a lkVkDABpCgUszAzju+7rRTxDZt1NRL6VFJr/isKGm2WoakxUIndYFPvQ8XeUbX0IuFtH AYRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZXuj5ltu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l14-20020a65680e000000b005ae22729b09si10852318pgt.683.2023.11.21.09.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 09:19:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZXuj5ltu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DD54F801BAE9; Tue, 21 Nov 2023 09:17:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234459AbjKURRe (ORCPT + 99 others); Tue, 21 Nov 2023 12:17:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234456AbjKURRW (ORCPT ); Tue, 21 Nov 2023 12:17:22 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C5010DA; Tue, 21 Nov 2023 09:17:08 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9fa45e75ed9so474060066b.1; Tue, 21 Nov 2023 09:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700587027; x=1701191827; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=swhdhjkQ4NCZZT2+5iCdL+NEq1b8GxVa0Me/RJxD8Hs=; b=ZXuj5ltuVb5wZ33auRp2oxBY8VPwiNJGv7c8WI3sPblFjXHNvFAtSCu7BWfivItF+r 8jU0tyVz0gVDKzpu+etenBx4csLTQVBoYB2Geir8Y+Bz24wDaoJVUfCqAVskLL1UrHVn j+BCotxkXxA/yl3f6HxoAp27dBhWvS6Dcx9ijBOKbkvi3/pK1ujY1LsE+aC/06zWysyQ xrSlEtINQmfBtINRHwX9/wE4P1PzIy7gvg2CAzQyGtuWsIVuB+P09OebjIVVPXvpivuz B1EU466I/lRtqLHTlPgU6zNOHwItEbyYdnqwNI/i9fP90wBHY9zKQo5ME2gHLPJ/y7WA jbug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700587027; x=1701191827; h=content-transfer-encoding:in-reply-to:from:cc:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=swhdhjkQ4NCZZT2+5iCdL+NEq1b8GxVa0Me/RJxD8Hs=; b=Q+VkQ4/DyG3ylNojFauUcGMr5+yk6baCLC7LdwzkIM9/e+83QmprFFJQtD4qIi5S5B rFW91q3uUT2P+5SC93HyEzF+hOGKt65C+0LiWej2qfzAIkrQBrfGHOi/0G/K3p7uzqM8 0K803TU5NZYfE4rlzyfcuzBLS2j9+FdlMmtvAH1ip2Cy32BwFxopsEFD1FM8O1Z2mOXR TOY2hLmxRbfSoMHkgsSqrtUp+xLNTmahuY3g9W2edmxxhPVq8UIbpYTEaHPBm0zUK14t 0ASnbyY/puCpxwpJnCfuVX5IptPhEStDdva3btcMVuKideTrFKLlZwEFHdGRk7K3YIsq 2dHw== X-Gm-Message-State: AOJu0YzJTYt9wj8ShrCbOhItk/TkcImmMeaVf7oK3rVhJNi2AFVq4/pp Nl2w7QvLAAhCeDgZWhtHXbI= X-Received: by 2002:a17:906:d28c:b0:9fe:5d39:41c6 with SMTP id ay12-20020a170906d28c00b009fe5d3941c6mr5201086ejb.51.1700587026775; Tue, 21 Nov 2023 09:17:06 -0800 (PST) Received: from [172.25.98.130] ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id uz4-20020a170907118400b009fc2a76ddedsm3606927ejb.17.2023.11.21.09.17.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 09:17:06 -0800 (PST) Message-ID: <7234efaa-58db-4a49-b422-27fc08d6b6e9@gmail.com> Date: Tue, 21 Nov 2023 19:17:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/2] iio: adc: ad7173: add AD7173 driver Content-Language: en-US To: Andy Shevchenko References: <20231116134655.21052-1-user@HYB-hhAwRlzzMZb> <20231116134655.21052-2-user@HYB-hhAwRlzzMZb> <5cf3824f-6375-4c76-86ff-c5389ddf4196@gmail.com> <643d2c2c8dd4490081c234b6831ee5dd@analog.com> Cc: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Ceclan Dumitru In-Reply-To: <643d2c2c8dd4490081c234b6831ee5dd@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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_BLOCKED,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 21 Nov 2023 09:17:38 -0800 (PST) On 11/20/23 18:21, Andy Shevchenko wrote:> On Mon, Nov 20, 2023 at 05:55:12PM +0200, Ceclan Dumitru wrote: >> On 11/20/23 15:00, Andy Shevchenko wrote: >>> On Thu, Nov 16, 2023 at 03:46:55PM +0200, mitrutzceclan wrote: > > Use struct_group() to show explicitly the group of members. If it's not an ABI in any sense, then memcmp() is fine. > Alright >>>> + return vref / (MICRO/MILLI); >>> >>> What does the denominator mean and why you can't simply use MILL? >> >> Original vref values are in micro, I considered that it was adequate >> to represent the conversion from MICRO to MILLI as a fraction. >> >>>> + *val = st->info->sinc5_data_rates[reg] / (MICRO/MILLI); >>>> + *val2 = (st->info->sinc5_data_rates[reg] % MILLI) * >>>> +(MICRO/MILLI); >>> >>> Same Q about denominator. >>> >> Here, a misunderstanding on my part of a suggestion from Jonathan in >> V2, will be removed. > > You need to clarify with him that. > My misunderstanding was that he only referred to the multiplication, not the denominator. *val has a conversion from MILLI to no metric prefix while *val2 converts from MILLI to MICRO.