From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796318590; b=s0vooQnxG+ChwwavmIKv1hRF3NYQfsz6pbc4/FyywxERESinhelVmEsmelT8kLpjkkZs FE7zgGsle85yEcXANckyTF18ecFQ44ENMGFnHE5bvtm9a7dDfclFlipRG36nSw7hf+Hfa C8qRYURR/mbuS/NMvYAAc3TaP1XmjXLH2y0iwZAXCimMgOF6g3xoiDOY6rAos7yUlTWad j49D09oPaqW2B6GpCojRYI2VIBq4MFYTbpiUXX8BBeOvv2gUQH06eRjelJ/HjjMZQzz2i 8cxTrHLcXS/YhcsBEmgfhNZnIHCVrg2YtjnfkzZ0JwPnk92D5mpV4ci/uLqTwTQWwKA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796318590; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:Organization; bh=1WieR9qyoxsB2t3hVPoJJfbrnBjAR/taKWTlA7zucX8=; b=SwttaGeu47hkzOFnn7OVAMRmDi+EOLt1RVJEjOF/M0ulQeLn2s4Jhjz2TQ4zRYKhxGsV nIFN2JgQtvIFqkYh1mR3u8JBbmuqWksnO5/Y4aI5nya4EBWKkAMopdZExLlQSD3psayM/ jePjQCOFfTHJIL80TFTq1SaOySRdQmKT+vyBa6mcVO510/+MOpaiAE2XkXGVgvlWLTEgo s0Jnsk4WWnvPzJlsAtyieNgs9EVLrEF+j5+fsDG0OCetUHMEcgFiyXttpRATFxaHOBSIc kGt/091kA7YiB/JuidjddrxMMmds/Nl5PGCduhO2RzXmVt12/Hh7PDM9YbatQOGUJzg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=NjDtRWCk; arc=none smtp.remote-ip=192.198.163.7 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3560D606A322; Thu, 3 Dec 2026 17:23:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3560D606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=NjDtRWCk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796318591; x=1827854591; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=1WieR9qyoxsB2t3hVPoJJfbrnBjAR/taKWTlA7zucX8=; b=NjDtRWCkJkWtGJnpgQZgUVHkysFY77ovqSfAgzCoDqB9tkt/QrRnqIji 3eyszpizmQdEsTKaiI7J5yDCRFvxt7RWDVr143x2vfNuU61mTYGG6HYrZ Rj4u4HlUC2gMBv3AwqRKNgQB2X7uY2qdG1VIUvfWHP92PqYNhEN3vBCpP 6NKzDsG1/1JtgM+MsJNZ3mfp0ZhHs1OUom+mR4UcM67agF3lim3Zxm33P 3x+RAClSS0+fF48pbaQuU2b1ddIL09I08TtB/OkskJ8dTFJ2/bVBo3PSi HU6RHYWxgWEvwiolFqZ0ad2MqMJET95Ke2s9A+Pb/2gTpwEu4aayQJWqU w==; X-CSE-ConnectionGUID: LIjdS28KSPSswf3qa9ySTQ== X-CSE-MsgGUID: M1qk5I5STzC+ioR/Z6N1hg== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5143439" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5143439" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:23:10 -0800 X-CSE-ConnectionGUID: 6slZlTWmR72yWIFxdA36vw== X-CSE-MsgGUID: FcHPqXAtTQiszJpqkFvlug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="14106786" Received: from inaky-mobl1.amr.corp.intel.com (HELO localhost) ([10.245.244.115]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:23:06 -0800 Date: Thu, 3 Dec 2026 19:23:03 +0200 From: Andy Shevchenko To: Janani Sunil Cc: Marcelo Schmitt , Nuno =?iso-8859-1?Q?S=E1?= , Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ana-Maria Cusco , Conor Dooley , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux@analog.com, devicetree@vger.kernel.org, Janani Sunil Subject: Re: [PATCH 18/18] iio: adc: ad4170-4: Add support for AD4171-8, AD4190-8 and AD4195-8 Message-ID: References: <20261203-ad419x-release-v1-0-18578ab50524@analog.com> <20261203-ad419x-release-v1-18-18578ab50524@analog.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261203-ad419x-release-v1-18-18578ab50524@analog.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Thu, Dec 03, 2026 at 04:19:58PM +0100, Janani Sunil wrote: > The AD4171-8, AD4190-8, and AD4195-8 are eight differential input members > of the AD4170 family. They expose analog inputs AIN0 to AIN15 plus a > dedicated AINCOM pin. The AD4190-8 and AD4195-8 have no integrated DAC and > share the AD4190-4 sinc5 FS range and clock divider, while the AD4171-8 > keeps the AD4170-4 feature set, so its maximum output data rate is > 500 kSPS. > > Move the remaining per-device difference, the analog pin count, into > chip_info so input validation adapts at runtime. That also lifts the > adi,vbias-pins count limit to the nine analog input pins the four input > devices actually have. > > AINCOM (input number 16) can be the positive or negative input of a > channel on these parts. Accept it during channel input validation, and > track its use separately from pins_fn[], which only tracks the regular > analog input pins, so that AINCOM follows the same rules as those pins > when shared between channel inputs and excitation current outputs. > > CURRENT_SOURCEn I_OUT_PIN accepts the same set of inputs, so excitation > pin validation follows the analog pin count as well and accepts AINCOM > where it exists. ... > help > - Say yes here to build support for Analog Devices AD4170-4 SPI analog > - to digital converters (ADC). > + Say yes here to build support for Analog Devices AD4170-4, AD4171-8, > + AD4190-4, AD4190-8, AD4195-4, and AD4195-8 SPI analog to digital > + converters (ADC). No. I'm tired to repeat how it should be done in scalable way. Read mailing list archives and act accordingly. ... > static int ad4170_validate_channel_input(struct ad4170_state *st, int pin, bool com) > { > + if (st->chip->has_aincom && pin == AD4170_CHAN_MAP_AINCOM) { > + if (st->aincom_fn & AD4170_PIN_CURRENT_OUT) > + return dev_err_probe(&st->spi->dev, -EINVAL, Add a temporary variable at the same time (and in previous patch(es) as well) struct device *dev = &st->spi->dev; > + "AINCOM already used with fn %u.\n", > + st->aincom_fn); > + > + st->aincom_fn |= AD4170_PIN_ANALOG_IN; > + return 0; > + } -- With Best Regards, Andy Shevchenko