Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp366759lqp; Mon, 10 Jun 2024 06:41:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYkuPhTHZeNgHlsimznFqPjE7iTyrHpQSbEnb/FOOp8Z5r9XFXNHsDVC2glhsCk/gj0rTtSN30vwI+Nk1Vg79NodTTbrAYlnd94clZWA== X-Google-Smtp-Source: AGHT+IHB+afeRkoFePtBJ7h8lW+gmR6wzj05rxhZO/Swu9xQ4ipsr7SsmeuMwkkEDCmDwm6O9fQM X-Received: by 2002:a17:906:c254:b0:a68:67e4:7f0d with SMTP id a640c23a62f3a-a6cd561b41bmr577804866b.2.1718026881600; Mon, 10 Jun 2024 06:41:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718026881; cv=pass; d=google.com; s=arc-20160816; b=TbcPbzOiZ0MtnfA8Tk3laL4wOZF0Vy429Rslhf/s/HZzHom1KHwUGCVQ1kpFpTFRVJ 49BlBnzJgsdRE26XGG74OGhI2lmefC8IlYPk+KUNER/ZUJPKjY0tVyLhinniGFfob5LM c2QaqLSMY+9CRBEJvtnNeOG0Kcr79zSf/cscdnlD/yF1MoQ3CVoCWtS3FIlg8RidoJap G10q7hpinCgNzO/XmGSTPN9s2ATzN3iqr0RkYbHo6Ezs5k9/ZdNtz2lTcJ8CUeh6wPt+ 39HeYWZtlE/OeX7wQ0/aGdUvYacRTKqt9xnX/2mqCboNU0tjtXyguplQXWh3I9nTyOx6 Yk4w== 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=xDG2nxV8ZPl1b2CwR6DrsnQRSq1ctUVW1/oMRxru1WE=; fh=xRhEfXB1CsL9DDz42JjnL9aX0LUS+byvR1lgjH6MA/E=; b=cPsOjLqsPdsuRFIoTkB3DjueTKFbL2gJlStKQ3TFbXAxq8v04Dwxe0PDPNMZBJztIX IMdBvD9Cnrj0EfY2ALSKZmGbe4iSgUYxvU+yJkD0ZTESQeuGDgHcrstRphiwX0fWhsCb YGaq79g+7BRp5geawCYKyNnEk91W1m5nX2n9NnC3ptULH4DXysHhYShtfVIJgBHPuOe4 o97YoSHVNy++ubfiBpONByCk4eRuUGEQvuCfi8Mh34yUIUBmQQoGe2RwF9Zr2O+Xl9Wb J5gFE0+8PKwJwaJ0qgA/rkdK6N8B7uy4Ru/t+H5TeDQPtRQxMORHovxtiOXFk+rXibFI dzqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=XNFnJczH; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-208245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208245-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6eff1be1e5si240517066b.608.2024.06.10.06.41.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=XNFnJczH; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-208245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208245-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2436A1F2166B for ; Mon, 10 Jun 2024 13:41:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADA118527D; Mon, 10 Jun 2024 13:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="XNFnJczH" Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 D1D6278B4C for ; Mon, 10 Jun 2024 13:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718026861; cv=none; b=UYg90tfW/ZWmjO3+uf8Shu4FzZprsZWnkCR2gMgRZ/zLQxPCoX4mCseV4FkL2FvaFc+CUB7jhMwnqbU3kQSolpAe9Ev/ChVy6B4jt/npc4czwA2uvN3df7i6PRT4GhZVqvOAnm7jy2u3uusOIgNfx4OTsBwiwplGNiRQS3tEpDk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718026861; c=relaxed/simple; bh=IHIUW+O5SruheAsKXKeG18KB+xoYjtu8WU6lClaG8FQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gBirEb0Wm6wBNVpHmg4qEZSyorj8MPW2LOda5snBp5Zc85Hi7+u7fO5Gd+OHbA0MAyigH9uOla+toh6kJURMQN0eriZuAxSe1YlEcQqGbStTDhDgOwqG2OoEWpgfF/xJBXWOmL4bCc+RLA1WelOZOsj8spY5ulud94TRKmEmWLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=XNFnJczH; arc=none smtp.client-ip=209.85.210.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6f98178ceb3so940257a34.0 for ; Mon, 10 Jun 2024 06:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718026858; x=1718631658; 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=xDG2nxV8ZPl1b2CwR6DrsnQRSq1ctUVW1/oMRxru1WE=; b=XNFnJczH39p79SDaOOFwm5ejocyi2jZsJZHWPJ2Mo1cilAEhCuZ+GfPda5/45O5cxL +vVBNzZ3tUCKIASqrdowmJ9LhAYlHDzvLfuDC7oYtK1Z7cLEILHXCagZ2rQhUER264+N P0rEHsYiLGUETZUVFTfUVDpTCOQBoCp4YeZTGY25PpOUm/klNyA9+yMnr2+kfR6yB7QT Yken7LjsqxjamG6N1FhsAQJ0KsfAgolaKee6YlOOAVuNUIS3iG2qtFCN/v7zkR3P791m 7sNHhGBSacJw1X2xbGQbMV8cgdomKwRbiATnFtqxB0BlM2d7vjIBBw0e6nPBqxSqs9mq AWSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718026858; x=1718631658; 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=xDG2nxV8ZPl1b2CwR6DrsnQRSq1ctUVW1/oMRxru1WE=; b=FA3fjqhMQbRuDaoSFfrJnRSMh1bPoRF+NybikZkSQaq4LPoDkMxNKQ3Rf5I4GemPAp 2mvA4pKXKMHuYVygOotydXohBN5JACiHajqfBvXpN1Kh/WBE1fXxXiBU8b+5SWka3hJ7 aTk4pTDPv5hOI1rOe0R4NHCgl7OdsaIaFynlMFvNk4pOyYc92Cax+ZdCSMg4awTYKgqB CCjp56YjzaKjlr+yGkAD3jMJ4eQnCR1yjzHR2NuIr6bR/bUVhd8ZOhOvRv6bi5ztRzHV Y4nSS3mO1AVNokADBk96t3rr9xjCsPanFid/W6xhTmp4DArUvq4ZuTiptNyQbcinHeJd cckA== X-Forwarded-Encrypted: i=1; AJvYcCXF/ewsMOQtSljZCWLUyOaD9BeAGJJgKQ55tVPUdFk8z7xew/QQN08JyxrOKlOXwAaQQKQeQgmiOmUgdYz9DTrM8QqvQvssYwQeVsI3 X-Gm-Message-State: AOJu0YwX8lISYebNzoQKPWfMqFET2nn4jMRpWxnUSQdhNG/Wjj0ir2iy 20mnrejVZqjMl8e3sHuqxNKznPuGWJnG4iIpxJ1wjKFk5JBNqO1EIOSmQxnhPaY= X-Received: by 2002:a05:6871:608:b0:254:ca65:1ed3 with SMTP id 586e51a60fabf-254ca6536efmr2782598fac.2.1718026857755; Mon, 10 Jun 2024 06:40:57 -0700 (PDT) Received: from [192.168.0.142] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-254d7f33351sm259822fac.46.2024.06.10.06.40.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Jun 2024 06:40:57 -0700 (PDT) Message-ID: Date: Mon, 10 Jun 2024 08:40:56 -0500 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 v7 0/9] Add support for AD411x To: dumitru.ceclan@analog.com Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan , Conor Dooley , Nuno Sa , Jonathan Cameron References: <20240607-ad4111-v7-0-97e3855900a0@analog.com> Content-Language: en-US From: David Lechner In-Reply-To: <20240607-ad4111-v7-0-97e3855900a0@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/7/24 9:53 AM, Dumitru Ceclan via B4 Relay wrote: > This patch series adds support for the Analog Devices AD4111, AD4112, > AD4114, AD4115, AD4116 within the existing AD7173 driver. > > The AD411X family encompasses a series of low power, low noise, 24-bit, > sigma-delta analog-to-digital converters that offer a versatile range of > specifications. They integrate an analog front end suitable for processing > fully differential/single-ended and bipolar voltage inputs. > > Particularities of the models: > - All ADCs have inputs with a precision voltage divider with a division > ratio of 10. > - AD4116 has 5 low level inputs without a voltage divider. > - AD4111 and AD4112 support current inputs (0 mA to 20 mA) using a 50ohm > shunt resistor. > > Discussions from this patch series have concluded with: > -Datasheets mention single-ended and pseudo differential capabilities by > the means of connecting the negative input of a differential pair (IN-) > to a constant voltage supply and letting the positive input fluctuate. > This is not a special operating mode, it is a capability of the > differential channels to also measure such signals. > > -Single-ended and pseudo differential do not need any specific > configuration and cannot be differentiated from differential usage by > the driver side => > offer adi,channel-type attribute to flag the usage of the channel > > -VINCOM is described as a dedicated pin for single-ended channels but as > seen in AD4116, it is a normal input connected to the cross-point > multiplexer (VIN10, VINCOM (single-ended or differential pair)). > This does not mean full functionality in any configuration: > AD4111:"If any two voltage inputs are paired in a configuration other > than what is described in this data sheet, the accuracy of the device > cannot be guaranteed". > > -ADCIN15 input pin from AD4116 is specified as the dedicated pin for > pseudo-differential but from the datasheet it results that this pin is > also able to measure single-ended and fully differential channels > ("ADCIN11, ADCIN15. (pseudo differential or differential pair)"; > "An example is to connect the ADCIN15 pin externally to the AVSS > pin in a single-ended configuration") > > As such, detecting the type of usage of a channel is not possible and > will be the responsibility of the user to specify. > If the user has connected a non 0V (in regards to AVSS) supply to > the negative input pin of a channel in a pseudo differential > configuration, the offset of the measurement from AVSS will not be known > from the driver and will need to be measured by other means. > > Datasheets: > https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf > > This series depends on patches: > (iio: adc: ad7173: Use device_for_each_child_node_scoped() to simplify error paths.) > https://lore.kernel.org/all/20240330190849.1321065-6-jic23@kernel.org > (dt-bindings: iio: adc: Add single-channel property) > https://lore.kernel.org/linux-iio/20240514120222.56488-5-alisa.roman@analog.com/ > > And patch series: > (AD7173 fixes) > https://lore.kernel.org/all/20240521-ad7173-fixes-v1-0-8161cc7f3ad1@analog.com/ > > Signed-off-by: Dumitru Ceclan > --- Reviewed-by: David Lechner