From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (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 7340C3112DA for ; Mon, 13 Jul 2026 14:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783954558; cv=none; b=uIbXqAP9vj9uCWlTWUPFplQItwmQTHHRE3YAW0cWvsA0/2aenbogOaNPYJA+6pwvQF9gYXfBxAKZNd3jMbFoZZi0e9x5WpEHDfmvX3vmtxevF6CVNW+3GonxqtVksl6yDpRAZdCzd7a4sVbBWURNLkE5JgDn2aRsE2kCP2xvy0Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783954558; c=relaxed/simple; bh=YELl1y3J0mGPUhcgSqbaaf3tbHR8Imjyjm4zvt2BTb4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=vDTWkfUaJewhum0V+7zchZttqtNhEvWSjdEN/2U37B3YSS1psrMRIWjuYL+uUOXZI5/Ea0xqumnJkGVgV/I0hEQoGCbkzZkF2uc3UK5FMXMOgLF1HyQJ1HMvC+G+5acjNpCpCK0hxN2FzHnYofEcz34YvE/3v29sHc2ykIbSUgg= 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=d7xaOHiW; arc=none smtp.client-ip=209.85.217.53 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="d7xaOHiW" Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-737de52625cso1594563137.3 for ; Mon, 13 Jul 2026 07:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1783954555; x=1784559355; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=h85/e4FosMhyyW2A5K8lpjg8Eb2pk4okTuj+ceX0Hik=; b=d7xaOHiWL+u0VKSs6dQuhCTLOVtoFhc7fWD4NjASNttxn5U4PqN8/OZGAASBEe/QAo njNFmWhLxo/r21AbflFt5C62U8DnMuTKzUsVmlFV6dh+KgFkJRyprfxzJU/v6XF9Ll81 7UeY1puwsXXnvYTo+lz4DI/R4THEbb+HwkEPYIxpzUZdn8NdjFgQJmPwCvZRFoOYg5pI 791GccvKbodjbpnCDJ35PFjW4nJYD882PjaD8XD0HoMoZ1YAQvuOJWru/UMJS9UEvVZV IN8LiMdXUFXrT6VPSLmqJZcy7aT3/e6RAkqSWYXi8xJ6AxJWHbXS3y+PT1E+NvzgYSQz /isw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783954555; x=1784559355; h=content-transfer-encoding:content-type: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:content-type; bh=h85/e4FosMhyyW2A5K8lpjg8Eb2pk4okTuj+ceX0Hik=; b=ZiKx3K89AGSZDHGfUlzqaWvEvSBxrz3C8HRlKzW8Kx+BuF7lmwIL6wQFnUtimyjnGC 9pKJx+zgQ4z+VwXwRnKzJU6ZGlT7ruFGmn2Rxspz0XyrPavEIBGZHaRPoJ6rrshqLErS lkf+BZSwUwZOGfUGZ+m5EijBBC7e5xohnW7rWrZxoXICpNE++5pNIo0PbXomM0RhGJex LLFEc0pTKu35LQvvsPrG82WLWoj4UeZ0Adqd0weAOlO1FqG37BQK16ZUqE8+1gNz/4yz QIwsWKtrtkiRPCBkCYvZTRMGk7B3DhNjLgKrZBGXqVZPujU6HnExcOqRm5Qc2pnm47qm IxZQ== X-Forwarded-Encrypted: i=1; AHgh+Ro/J+ytfVT1XSJYH6Q27sriW2vIeCaxuN621XG4Z1L0o7r84RaUA5P75jptMi1U6g496Ws32U7yJO486m0=@vger.kernel.org X-Gm-Message-State: AOJu0YwI3DJG5z8b9Y6EBzmngfNda8QyIXwcY+huPLe2yfhgmoXAmnmL CrK120EWXk0DZZn1+7V+/hhcnuMqu67upS9YIncNWhbF0rqNCZAqOWhwygW7N9wyC4Q= X-Gm-Gg: AfdE7ckMiT7PLp/pKT00eEtmnjDeCEBaAUT6I9mZ1reuDry7Y96VE5mKcenCdqFPnSD k14Hm30TwJOklJMt2ynH3940wqtTjRmTrXxNL6hEiG4BsY+HdRG6pjTS2y9R5agtqyuh7sdemGo z5U8HWPzPBRvUg/hX5i+Fxh2sshr50fl1cpzRNYCuKrV41cvYt2acfzeoICRDGQXhUIdxqqJvK9 5T0NV4O5JwC2FI8fo8UgoXvHYonOggycQ3hXdfF3N36NVALBsp9KNbk/NP3ajn+AG9mkZf+X4ej XVWzmk9fLH3E3XQ71VmEbEsCEA9yxbFRLfTmT0Ombn4RgEK37ThMS0h7ga9f3GdRTX+oi8J6ibx XdHMyTwittAj02jVHwoD3h9wGOl7Hh1KjxK0EmnPdIoyVvt9OZnXWbDBni/x0lVCKHG5bNdMIJD +m2aN5T7NcDJtOX6jHiXWQocMI3auMudmeoT3CZESj33A+WkuIozbkDLfB0Be4Ciw= X-Received: by 2002:a05:6102:f12:b0:729:1a8d:b2d9 with SMTP id ada2fe7eead31-74533e17d5amr5917697137.22.1783954555481; Mon, 13 Jul 2026 07:55:55 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:610b:e45c:5e0c:e14b? ([2600:8803:e7e4:500:610b:e45c:5e0c:e14b]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-96ed25847e5sm7785373241.2.2026.07.13.07.55.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2026 07:55:55 -0700 (PDT) Message-ID: <1700ed07-47b5-4831-87c5-a6115928baab@baylibre.com> Date: Mon, 13 Jul 2026 09:55:53 -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 v3 4/8] dt-bindings: iio: adc: add input-chopping property To: Jonathan Cameron Cc: =?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: <20260710-iio-adc-ti-ads122c14-v3-0-746d52cbf1d0@baylibre.com> <20260710-iio-adc-ti-ads122c14-v3-4-746d52cbf1d0@baylibre.com> <20260713023443.1a7a9acb@jic23-huawei> Content-Language: en-US From: David Lechner In-Reply-To: <20260713023443.1a7a9acb@jic23-huawei> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/12/26 8:34 PM, Jonathan Cameron wrote: > On Fri, 10 Jul 2026 17:50:37 -0500 > "David Lechner (TI)" wrote: > >> Add a generic input-chopping 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) >> --- >> v3 changes: >> * Renamed property to input-chopping to reflect more common terminology. >> * Removed "allowed" from the description. >> * Extended description to explain when it should not be used. >> >> v2 changes: >> * New patch. >> --- >> Documentation/devicetree/bindings/iio/adc/adc.yaml | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml >> index 308857f11220..c408feebd46d 100644 >> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml >> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml >> @@ -80,6 +80,14 @@ properties: >> ADCs usually allow choosing between internal reference sources or a pair >> of external pins. >> >> + input-chopping: >> + type: boolean >> + description: >> + If set, the positive and negative input channels are swapped on every >> + other conversion to reduce offset error. This generally comes at the >> + expense of added settling time between conversions, so should be omitted >> + on systems with high-frequency signals or high data rate requirements. > > I'm lazy so I didn't check back, but in my mental model of this, the DT is simply > saying that the analog circuitry is suitable for doing chopping. Driver decision > on whether to do it. Perhaps we can reword it for that? Heh, that was the "allowed" part that I removed. I think this is really more of a design decision between the tradeoff of less noise vs. data rate. By setting this property, we are saying we should favor less noise. So I think it is more about the expected signal than the circuitry. So not sure that I would add anything here. >> + >> excitation-channels: >> $ref: /schemas/types.yaml#/definitions/uint32-array >> description: >> >