Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2085838lqo; Sun, 19 May 2024 12:39:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8W3obhqPMe/egpkveEBu4XykbEZZ3KKe1fflJ4Yy6BpB7w3u9DGL3n1NStzrlL59NbdZJAAhO1ayvZ8PFg51mktXs7uxsfzXSZ9I00Q== X-Google-Smtp-Source: AGHT+IG1vvMoFasdWyBkGPLsbUel1PflJhTMt2M0iaIigdRJ4p7NyQg1qxD4kNWUQDipQhUkJfED X-Received: by 2002:a05:6870:351:b0:23b:34e9:9772 with SMTP id 586e51a60fabf-24172f5e5bemr31940627fac.39.1716147542245; Sun, 19 May 2024 12:39:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716147542; cv=pass; d=google.com; s=arc-20160816; b=uBTXP4t7tI0Xy0zl9W025sVwr/d+BR+gEf0S7sOfRd916Lp/UCF61aEF6GoCT1Py0h CTHTcNKU/TsocD2lnWTbMZJwRSaUzKX1vinoumaiEV2hgYDXQ2d9y+nzhbkA972qyqU1 Dlv6K+x0r5brCqZF0SvzTeScLBpVnNVKdh02fkN33sSfkdtKPpVo53xGl5Ef8pi0zIEF N724erlSpQMKJ4RZibXTQ7snw7d11CauYkSC56KyQyZgCBLZgihj7ThnaF6iX9mMhQYl IGOlZm0m+ys5IRpo9c4HZ2Cs1/Rinnv6M3R+JHvpmbW4apO0m6W8pan9AhS+1gUDvBSM +4hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Zj4jSaDvedvDrxg8jax5CvqISE9uZYMJo6q0wXM5EZ4=; fh=oTduzh9PUh1MRmg8IF7CGit9Xwbepb4IxW9wpudDHuw=; b=NT8bvndknswxApOencHbu4wkfrl2vyXuyxLMl5gOZ77B2/QBatHzdRwcxOc0XtA5sR CYrB/3xpLjHp1K6ZpaR2gqOt4uKgg7mZuZcAmHYsspIYm8PpW+ScmhG3in+3rE233vPe uPZiMfU0Mmm39kjsZMGmKWiEshOdTgqMDfAEexbwb+ApBVPv9WDfA87VSc7UQqnvPvPp wvcgiquj20bWOgB3MGNXPm1goDt2EWYdacQNIDUPOaP+maNV+yRf4ujXm3ByuRQpKJ0l jcyBkqhQhZyfh8M7itNjwsIneCqrsmHGrWGu9JUegha+N0KnazdHHf7wBw4xfu591Y34 RzyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bTrTTAXc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-183231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b1d58bsi21152918b3a.267.2024.05.19.12.39.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 12:39:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bTrTTAXc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-183231-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 79E5FB2129F for ; Sun, 19 May 2024 19:38:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EE4D6EB7E; Sun, 19 May 2024 19:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bTrTTAXc" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E0AB53E02; Sun, 19 May 2024 19:38:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716147484; cv=none; b=SvFmQ/MjXfJ48JTZFuL+rpZZP7nNCQlQtRj4pzokd/WfsZAKQ/4eLJAy0UlbXMIEtN7A2eGfiv9dk+d3BXce8fS+36PEUve1oNV4O6eSpSiOlvIwrS11Hx8dDQ0ebdZNWN5woACam29X+8xvt/ToVhSGrZTq3MnCYx/U511QRHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716147484; c=relaxed/simple; bh=pnvDrWgelAMwAQrYjlbqhDtT80Gw5tnuHUf3yzZM37Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tibd+Qv116eZKEnblx6vEb7w2RJL057LQTjXMdbchpDl/lu42CDTeVHap7K5+yDn/8BD62/scI39Lghq+Uad7sfmtmthGu3xMoraLThEBeliGmQxbjuQE0soHUcnuCltnaFdCQV8tSFJ5Zt2GjhRm3CqE/AQT5OEOze3oCsrDA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bTrTTAXc; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e576057c56so24249571fa.3; Sun, 19 May 2024 12:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716147481; x=1716752281; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Zj4jSaDvedvDrxg8jax5CvqISE9uZYMJo6q0wXM5EZ4=; b=bTrTTAXckdBBFQZQVYadDvSL+aLbRIK9BBhlf1DcZaSlhtNkFSGPpFvt3bX0Nz3GqP duJkLX+04mci2YMyaZnAv4gyD+pkcJJYPtgY2bioIRppERELZiESZEDhvbf6/XkoYsqi 1nVrqh9hhdes7jw9gjbB/MUK21d8TwKqBbCXqfuDzESYYk0GDOpZA4R1NF4Ku+JKUQHa 3GDI44qfIiCoz4Idhgp8E9Jq4QEnxHRVzEcnqKBHSsfMuvbEkZcZylqVCa8bCxsCwDAP xqP5AHZe9soQbmuPoumrxnQlsdL+/u4/vwJcCpbhLb5/rePOrPBgVpxgeEHDJ4cDASla 7ruw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716147481; x=1716752281; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zj4jSaDvedvDrxg8jax5CvqISE9uZYMJo6q0wXM5EZ4=; b=Q9vZXcDYlWWXE98SEmvQHQh+2Xm9CZGsTCSOH8g/Bh+CPCtWuDTC52J5zo2qxGD8sJ /OsBHOUbvehevYXs3GCQb1knSFKLOhEotJz4XP0Fj1RamEld7rLJ+GWfpSiQyJlHoPfH cIq4Wo8PuAWgTmViOH8BkKpCXQ915OBVfd0yGitEpMKKy43f4eENiBMzH3rWBE+rkCUE DHvfBseBg3jm7xezbZnTLBayOYgGegKvlnxo7rL4X6rcqFaT/HP5apZOiou0oKWQqyyH iOc7cZpU75I57ciILimQrF0Fqr/Q6ApfXPjwRj66oPqizATeyI9NiEAwcm9R1BxMSf19 UA8Q== X-Forwarded-Encrypted: i=1; AJvYcCVDmyN/Y4uykC1qpPls+EVBwsh1eaI3R0en+sYDZLfGLB+upOKynAUNWbtGcr5WXWFynr9SaqhJ/RWV6O3L4BuzXheCVB9jG1qJJCh/lD21myniYafUu3OkkNv9BRFLVhq3SEjyaRIim9O70Q8ik2q589CRXTnmiJc9cDDlDXHRinHTuw== X-Gm-Message-State: AOJu0YyECy9uNq4jfflpH8W4XTpBm/NqUCAKTofxnK2FfNNI7CDcs22w F/v4mxVTRM1zlbSY+Aj2oJsh7VOHzqFqbgOzbdAgAXPcTyPO1AkfTL/z4tIk X-Received: by 2002:a2e:934c:0:b0:2dc:d7e7:d68f with SMTP id 38308e7fff4ca-2e52039e285mr153395541fa.44.1716147480994; Sun, 19 May 2024 12:38:00 -0700 (PDT) Received: from [192.168.0.105] (c7.campus.utcluj.ro. [193.226.6.226]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5733becfbd3sm14715714a12.44.2024.05.19.12.37.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 May 2024 12:38:00 -0700 (PDT) Message-ID: <34c21023-441f-44e4-a427-f3e2bb2f5c15@gmail.com> Date: Sun, 19 May 2024 22:37:58 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 6/6] iio: adc: ad7192: Add AD7194 support To: Jonathan Cameron , Andy Shevchenko Cc: michael.hennerich@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, lars@metafoo.de, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, nuno.sa@analog.com, marcelo.schmitt@analog.com, bigunclemax@gmail.com, dlechner@baylibre.com, okan.sahin@analog.com, fr0st61te@gmail.com, alisa.roman@analog.com, marcus.folkesson@gmail.com, schnelle@linux.ibm.com, liambeguin@gmail.com References: <20240514120222.56488-1-alisa.roman@analog.com> <20240514120222.56488-7-alisa.roman@analog.com> <20240519190304.4d93530a@jic23-huawei> Content-Language: en-US From: Alisa-Dariana Roman In-Reply-To: <20240519190304.4d93530a@jic23-huawei> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 19.05.2024 21:03, Jonathan Cameron wrote: > On Tue, 14 May 2024 16:09:32 +0300 > Andy Shevchenko wrote: > >> On Tue, May 14, 2024 at 03:02:22PM +0300, Alisa-Dariana Roman wrote: >>> Unlike the other AD719Xs, AD7194 has configurable channels. The user can >>> dynamically configure them in the devicetree. >>> >>> Add sigma_delta_info member to chip_info structure. Since AD7194 is the >>> only chip that has no channel sequencer, num_slots should remain >>> undefined. >>> >>> Also modify config AD7192 description for better scaling. >> >> Some non-critical, mostly style related comments below. >> > Tweaked a bit. And applied. Please check the result in the testing branch > of iio.git. Thank you guys for the feedback and for making the adjustments! +/* 10th bit corresponds to CON18(Pseudo) */ +#define AD7194_CH(p) (BIT(10) | AD7194_CH_POS(p)) + I noticed this comment got away in the testing branch. +static bool ad7194_validate_ain_channel(struct device *dev, u32 ain) +{ + return in_range(ain, AD7194_CH_AIN_START, AD7194_CH_AIN_NR); +} And the negation got lost here. With these little changes, tested on board to make sure, running perfectly! Kind regards, Alisa-Dariana Roman.