From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) (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 C1E313AA1A1 for ; Fri, 26 Jun 2026 18:27:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782498468; cv=none; b=SVQcLf/JnlmokXKqb4LUCFLtm31P+Y3K8BE3a56tsqM1TqBJIvSPc1w/ggbyyJAcM448n5+s8UoTBgjPlD+lPOEsmFn9i72M6ys3cBeHkO2xfsPsvrGB8RZNb34nixWuH9rtzl8U85HjPOIDI+FZeWomtXf1qEYn25qcOsshqds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782498468; c=relaxed/simple; bh=lyT3EldEfOwmkWtrBBWexrVqziEG/Bbdig+0Ag3t3Gw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XmN/lMaltWEgQC6c3ODY2qvJIgl7ONnvWZmaBE6zqJOTZtgi0oyicCcIYb+7YOJdI/NwWmEjJRaDssyTfDO8OWNPJu11EV+/WSXDKcnKmyvznC8kJVnX0sFzx0pHRvAbvIIpkNxQ+WxYIwgdvjpG3kwBNRJETcL3cQbvmfLzSn4= 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 header.i=@baylibre.com header.b=n/lZCXVh; arc=none smtp.client-ip=209.85.161.54 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 header.i=@baylibre.com header.b="n/lZCXVh" Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-6a0eb989530so537257eaf.0 for ; Fri, 26 Jun 2026 11:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1782498466; x=1783103266; 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=krATlrD1N0cNM2rn+k1nT4wMryr7v1KxfLrh9V1RBO8=; b=n/lZCXVhgXWC2pwzMIxcD8af48WwPPkT+dAdcnRvuLI+EkO+bEiSQAhl+CtpTK7w+u M37zdEUADfpzv/dTgMKuqBNNY08vDBvxP3mwyzY5rOkonFv1n8RChRzHi9G1GbUoHVIM OkdfjtBsdt9inR+Ke3d4FZb6vsXFV78slIyJGyGArUBDecBd67Ldua7dSKu2JbZHv6y3 Wsi3ma2WpwIyWQmsjmGkLIcWkTIRf9W0DsF3NvxrJrWApcuRXgERfCgIOe9+AcRpkCJS syu/kVWoAoujMvOVVDQIY+2yQKcAGiHHAZiF7EmSOBpTP7O+NoSEOvgOsJCfdyayg00w RPwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782498466; x=1783103266; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=krATlrD1N0cNM2rn+k1nT4wMryr7v1KxfLrh9V1RBO8=; b=NsUp2HsfWCpATFjyAhZgDGM8WNelJeSdSqkx91YUKFqsyAuitc4/Fug1eUhUedQq17 PCov7QEbQQDTlfiM13Ku6jeVU4+KMc81EVMz7G8sayUo7S+l3RVEgnv3K0vaXbg1sIfE 7dBE5PZRCLkJnmOi38fZ67aVRCRGVHS1ckFUMUadIR9ipsxL1djr8GqhoPROCcc5Oj2U h3lFRvHYUvgSobXGJjfncQTBrfIsFXLkK9R8CpBMfVWeJHS0R3cnkR9d1JhNBy6PYXQg kvksRxqentf0B+JDU3MJNZbkB5noDxBR+wDz0GljVzotxQW17nTm4UtikN0alUKWPQTL L59w== X-Forwarded-Encrypted: i=1; AFNElJ+wLm4aZ24Bn+zrHITyk1lR8i9AfJ805Djx342KQEBkw5ZLaPUhtge50hvr28Fvx8OHuDhmG2k7DquXJPw=@vger.kernel.org X-Gm-Message-State: AOJu0YzuTzgrTLUJTTA5YyMPfrFgZzW2uskaysWvYu05M1UKziV0LgZ/ HBNiJQhUrKZHCRy3zNCgs7qxLpoTWY9Xhf6Zk3DfeT4n815fmzbW2s93jn/dgaxOSCDOvHX/XPI HQ4sF X-Gm-Gg: AfdE7clm4S9oVhh3W1my7RrpSu3VQ2pR9fbtnEpYGmgWHE9F3dgcHzsbIFWj/M8nTI6 ocUgBXdCc6CVLH4TwvPWuB6CRhawNoiuqxjMkW2jNE0/sJtCqdZ5vibaZCyCHPcbLkQXKf0vu7I 2BMhpcZ1HsISuqQBIO0r23ltyHOWQ5GhN/beUIOltwe6xs7LarWKRCt4ayg43/UXfIFUuG6hlPW Zzt9eRUqgicWR5MWjSKvh/U8ce3oDLZlScPocLsWi/dgLsSJouDR4SSNZte0MnBJSoRMwmnbY5g XmZ9nOYiHJcZzMI5sxcxJ2FVfHZgq7mB4gTg4wInR4IhjsXzMtNUB/i6jEnPm2QX6BIcPvIlby3 JvhPrk5X3e2d64jh0MNAx2b1DEpJ4hZPFSV4SESE4KQHfu1TN3K6sbf+QkZCPVtVby1sNpzqNEI iCKAJbm7I+6PClt6LucCZpaZRCo2D04d5nJVXRr4FtPDQx4tHqDH+wluX7irscSIw= X-Received: by 2002:a05:6820:1629:b0:67e:251a:bd3e with SMTP id 006d021491bc7-6a135185364mr5830289eaf.18.1782498465840; Fri, 26 Jun 2026 11:27:45 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:f1f0:2d9f:2f31:3426? ([2600:8803:e7e4:500:f1f0:2d9f:2f31:3426]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6a1414ec350sm1856375eaf.12.2026.06.26.11.27.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jun 2026 11:27:45 -0700 (PDT) Message-ID: <4a2c4c42-69fb-4491-ba77-b858623275ec@baylibre.com> Date: Fri, 26 Jun 2026 13:27:44 -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 v2 4/8] dt-bindings: iio: adc: add input-channel-rotation property To: Conor Dooley Cc: Jonathan Cameron , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chris Hall , Patrick Edwards , Kurt Borja , Nguyen Minh Tien , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260625-iio-adc-ti-ads122c14-v2-0-ceb9b0b561cb@baylibre.com> <20260625-iio-adc-ti-ads122c14-v2-4-ceb9b0b561cb@baylibre.com> <20260626-retinal-thrash-1095940e36ab@spud> Content-Language: en-US From: David Lechner In-Reply-To: <20260626-retinal-thrash-1095940e36ab@spud> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/26/26 11:14 AM, Conor Dooley wrote: > On Thu, Jun 25, 2026 at 04:55:06PM -0500, David Lechner (TI) wrote: >> Add a generic input-channel-rotation property to adc.yaml. This is a >> feature seen frequently in ADCs that are designed to measure resistive >> loads, such as RTDs and strain gauges. Enabling this can reduce offset >> errors by swapping the positive and negative input channels on every >> other conversion. This can have side-effects in timing and filter >> response, so it is not always desirable to enable this feature in some >> applications. Therefore, it is best to make this a property that can be >> enabled or disabled in the device tree. >> >> Signed-off-by: David Lechner (TI) >> --- >> v2 changes: >> * New patch. >> --- >> Documentation/devicetree/bindings/iio/adc/adc.yaml | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml >> index 9ec1f447b565..3d52c00922c9 100644 >> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml >> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml >> @@ -81,6 +81,13 @@ properties: >> ADCs usually allow choosing between internal reference sources or a pair >> of external pins. >> >> + input-channel-rotation: I got some internal feedback after I sent this patch that "chopping" is the more common terminology for this feature industry-wide, so in the next revision I plan to change it into `input-chopping`. >> + type: boolean >> + description: >> + If set, the positive and negative input channels are allowed to be swapped >> + on every other conversion to reduce offset errors. This is also referred >> + to as "chop" in some datasheets. > > "allowed to be swapped" means that this property says the feature can be > used, but userspace may have to be the thing that ultimately turns it > on? No, I don't expect a userspace control for it. More like the driver should enable it when possible, but a driver doesn't necessarily have to implement it and everything will still work, just with less accuracy. > >> + >> excitation-channels: >> $ref: /schemas/types.yaml#/definitions/uint32-array >> description: >> >> -- >> 2.43.0 >>