From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 58889189B91 for ; Sat, 18 Jan 2025 17:03:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737219813; cv=none; b=nnxMTHOLaQgLtSWiYw/p/kwgfsYiqLDlpLK1N4wZDtYPYMTeL4BMBhoU72Vc1T9n6IYcape3zjXU/EPKyR+3ob3SYNmdVQ9bsDXVrfdVxQjxthfrVuiso+RMj7f21l0vuqNB6pr4HojlBPY1BQdyH4vqkhPc1YDiXJGT1PT6YFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737219813; c=relaxed/simple; bh=DcBlJ+yHGq37mW8GwdQGML28nY73k807Xz5nemwgYNY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XV8ign6Z/5ojXtUCqpsirYfvSnSrDwQbjX8QUAND4wu2ZeLKEjDZ4S8VfMgbnAf3np8OtUInWqRwBZRGY4runeo/Ihcuhc3nKeufaHClIR96vJuylJ21MGl8QmYqnIlB1/dl4B/w7Ga9OzfR5EVswRQGJMD09fZkaEhMNfLudoo= 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=IoANaibD; arc=none smtp.client-ip=209.85.167.182 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 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="IoANaibD" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3eb790888c6so853983b6e.2 for ; Sat, 18 Jan 2025 09:03:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1737219810; x=1737824610; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=i1ANIyCbRWk79i6OyQ23QiGmTlB5taHEKJBo3hTbDHA=; b=IoANaibDouGlkSzMtvMONUGT/wVftir9F6ZpWzgzfWiMUzODOZsxq304qY7J6ZpRUt wBeJxkZQ+orpOzlMbsk13TUqhWE/8wIcHE9XJ0t66xY4oG/EH+2pNhUu7v4Hf627IHaE jTBJYf1LH905FxtQRwbDjF2d4MIpBGYuieUalq/tukwvjQ61JHhkuCygudvLwW4zJ5fR 1PhSGiR48hi9K73v5wLgIZXePlmKGhfhvIhxxE0L+cdxqlXky855jPAQSX2A97iAR33l anRBkqHAnRg4SXE/olPK83vE0MBG22u4aumGbVcSviqZiaaRlBY7jWgA08ef6W9OdjGR fibg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737219810; x=1737824610; h=content-transfer-encoding:in-reply-to:content-language:from :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=i1ANIyCbRWk79i6OyQ23QiGmTlB5taHEKJBo3hTbDHA=; b=O8A6WYOXc2JERO78Sc//gY5ctFY9wzShJ9rkDVqWx89ae9gVpuulHaat7dQ6n/R+W8 +epat1OD4i9LKIWII0rJMydsT8GSLs6zHRC7t3TUbUo5UP5cMWNZT3XFJvKSALNsgMMr tF6IFypJdmXZVaAheyoV+b2fe8Ov++7cBv3nIHs6CKqJJ6jJAt+9xyv+w81/rUVcRSYB aTnSwnqGYRBTNrmaqsBtRQEKitCUDI6lLQTjP6Wnn9mJrBtCrnrA8EDYCq4ALM2BwxCF zftyb8K0VaQ1+dYYSTbQwxpb7lE0QrXfiepGEFk7kkF0X5SjH4AnsWcztji8XM5Pf8ku dpNQ== X-Forwarded-Encrypted: i=1; AJvYcCW4RqppU7yOYhBfMs0hfQCOUqV91f9c7jx/JQkFbM0qXDpLQvdZsGIVvqVTIC9NKAu+ar7uUckol3okvXo=@vger.kernel.org X-Gm-Message-State: AOJu0Yy6xMw2nYetNdi2Lb3qJvh31i7Cj2xmAuuKu+IagwcFVUXWlOva xXFM8R/6eAWQZb8cxJio53STFZLSuG4/N/ZiKKBIyB7SJDK82GoBXFJcwIouDWE= X-Gm-Gg: ASbGncvWFIa3PKMOkbw4FU00XptsGoweULqcFcILn8u9q864pZJ/XpHT5TG9tKvRWH8 JIEqnCh7CSLZl4tcL5i9aD0QMWIDgYffmrPWeiSo9lN9WOiZPmLPcfsLnx4kUJYDAPY2DJD6f2e jPfR/1B4SxbIfMYbwR60DZxmDzC8IBgh9bTlJQVEoGG+CL1Gge66JFCGCpGATIoHIN6kVpEOP53 WTT5sK4Nf7CXjaSl8h/QizmMhEwwREtTxK/XV9m7vV7OlOwt8jfkWeSDI8P7E8xi/fxXvHobGRE JBq4ijN77xMLM/kvEawSCppWvjvaabc= X-Google-Smtp-Source: AGHT+IGaxsOFeQL9meWsDIzBtZAyWdpP3IMY/ltknxeZCB2vVovGDUMpfKmDrAXuoUZNZxN13+A8gw== X-Received: by 2002:a05:6870:718d:b0:29e:5e54:76d9 with SMTP id 586e51a60fabf-2b1c0a26ba4mr3995063fac.11.1737219810074; Sat, 18 Jan 2025 09:03:30 -0800 (PST) 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-2b1b90d0acdsm1857763fac.50.2025.01.18.09.03.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jan 2025 09:03:28 -0800 (PST) Message-ID: Date: Sat, 18 Jan 2025 11:03:26 -0600 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 v2 1/1] Documentation: iio: Add ADC documentation To: Jonathan Cameron Cc: Marcelo Schmitt , linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, lars@metafoo.de, corbet@lwn.net, marcelo.schmitt1@gmail.com References: <3bd58574-36c6-4102-ad7d-1aeff0e46a95@baylibre.com> <20250118155153.2574dbe5@jic23-huawei> From: David Lechner Content-Language: en-US In-Reply-To: <20250118155153.2574dbe5@jic23-huawei> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/18/25 9:51 AM, Jonathan Cameron wrote: > On Wed, 15 Jan 2025 11:23:24 -0600 > David Lechner wrote: > >> On 1/14/25 7:53 AM, Marcelo Schmitt wrote: ... >>> +1.2.2 Differential Unipolar Channels >>> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> + >>> +For **differential unipolar** channels, the analog voltage at the positive input >>> +must also be higher than the voltage at the negative input. Thus, the actual >>> +input range allowed to a differential unipolar channel is IN- to +VREF. Because >>> +IN+ is allowed to swing with the measured analog signal and the input setup must >>> +guarantee IN+ will not go below IN- (nor IN- will raise above IN+), most >>> +differential unipolar channel setups have IN- fixed to a known voltage that does >>> +not fall within the voltage range expected for the measured signal. This leads >>> +to a setup that is equivalent to a pseudo-differential channel. Thus, >>> +differential unipolar channels are actually pseudo-differential unipolar >>> +channels. >> >> I don't think this is equivalent to pseudo-differential unipolar. That one has >> a common mode voltage supply on the negative input. This one has a full range >> signal on the negative input. This is the diagram I was expecting here. >> >> :: >> >> -------- VREF ------- >> ´ ` ´ ` +-------------------+ >> / \ / \ / / | >> `-´ `-´ --- < IN+ | >> ------ GND (0V) ----- | | >> | ADC | >> -------- VREF ------- | | >> ´ ` ´ ` --- < IN- | >> \ / \ / \ \ VREF | >> `-´ `-´ +-------------------+ >> ------ GND (0V) ----- ^ >> | >> External VREF > > If it's unipolar, output must be positive which isn't true here. > Do we actually see differential unipolar except for the pseudo case with > common mode voltage? Seems like a weird device. OK, it sounds like you and Marcelo are considering bipolar to mean that the difference is bipolar rather than the inputs. In that case, it doesn't seem like there would ever be such a thing as unipolar (true) differential. I was looking at this from the point of view of only the inputs and not the difference. I'm seeing that the input voltage can only be positive, so to me that would be unipolar. So at the very beginning, when we first mention unipolar and bipolar, it would be helpful to add a bit making it clear exactly which point in the system we are talking about, the input or the output.