Devicetree
 help / color / mirror / Atom feed
From: "Kurt Borja" <kuurtb@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>
Cc: "Kurt Borja" <kuurtb@gmail.com>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/7] iio: adc: ti-ads1262: Add conversion delay support
Date: Mon, 06 Jul 2026 20:38:45 -0500	[thread overview]
Message-ID: <DJRYEEGVFY2A.2115GKK5BG36M@gmail.com> (raw)
In-Reply-To: <20260706182317.64cb0a4c@jic23-huawei>

On Mon Jul 6, 2026 at 12:23 PM -05, Jonathan Cameron wrote:
> On Mon, 6 Jul 2026 11:19:40 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
>> On 6/30/26 7:20 PM, Jonathan Cameron wrote:
>> > On Tue, 30 Jun 2026 13:44:49 -0500
>> > David Lechner <dlechner@baylibre.com> wrote:
>> >   
>> >> On 6/30/26 12:23 PM, Kurt Borja wrote:  
>> >>> On Mon Jun 29, 2026 at 7:50 PM -05, Jonathan Cameron wrote:    
>> >>>> On Sun, 28 Jun 2026 00:36:06 -0500
>> >>>> Kurt Borja <kuurtb@gmail.com> wrote:
>> >>>>    
>> >>>>> Expose the programmable conversion start delay as a per-channel
>> >>>>> IIO_CHAN_INFO_CONVDELAY attribute.    
>> >>>> Coversion delay was always a somewhere weird bit of ABI.
>> >>>> What are the delays relative to in this case?
>> >>>> Is this a device that does simultaneous sampling?  Pictures
>> >>>> suggest otherwise, and convdelay is currently only defined
>> >>>> in that case.  We might be able to extend it but it needs
>> >>>> some thought.    
>> >>>
>> >>> The chip has a configurable internal conversion delay to allow for
>> >>> external settling effects. See datasheet section 9.4.3 if you'd like a
>> >>> bit more details.    
>> >>
>> >> Since this depends on external components, it sounds like it belongs
>> >> in the devicetree. I have the same feature in the chip I am working
>> >> on and was just looking at this and plan to add it to the ti,ads112c14
>> >> devicetree patch.
>> >>
>> >> This delay only applies to a "new conversion", i.e. when certain config
>> >> registers change, and not every conversion, so isn't like the convdelay
>> >> attribute.  
>> > 
>> > See settling-time-us in adc.yaml.  I'd forgotten we had that ;)  
>> 
>> I got some more feedback on this and this may indeed be something we
>> want to tune at runtime after all.
>> 
>> I'm not really sure where it fits in though. On AD112C14 that I am working
>> on, the DELAY register value adds a delay (for settling time) in addition
>> to some other intrinsic delays. I'm pretty sure ADS1262 is similar.

It is! there is a fixed 52 usecs delay after starting conversions.

>> 
>> So one question is do we want a usespace control to be the total delay
>> or just the additional delay?
>> 
>
> Total I think.
>
>> And when the delay takes effect depends on other things. Normally the
>> delay only happens before the first sample after any other parameters
>> change. If we read the same channel again with the same config, then
>> there won't be any added delay. But if input chopping is enabled, then
>> this delay happens on every conversion.
>
> Hmm. That is awkward.  I guess the best we could do is either to document
> it as 'may be skipped if channel setup is unchanged either via explicit
> channel or parameter change, or via chopping'.  I kind of think of chopping
> as advanced channel sequencing - inX-inY being switched to inY-inX with a scale
> *= -1.

Thinking about it this way, shouldn't there be userspace control for the
chopping stuff too? Something like in_voltageY_chop_type, similar to the
filter type.

>
>> 
>> I'm a bit on the fence of if we should extend the definition of convdelay
>> for this or if we should propose a new settling time attribute. I'll have
>> to think about it some more.
> Smells different enough that we shouldn't smash the two together.
>> 
>> Maybe something like in_voltageY_calibsettlingtime?
>
> calib might be reasonable if it was a tweak to a fixed settling time
> and like other calib stuff would not necessarily have any scaling.
>
> If it's the whole thing and in seconds then in_voltageY_settlingtime 
> should be enough I think.

+1 for this. in_voltageY_settlingdelay might work too, as both our
datasheets call it "delay".

>
> Jonathan
>
>> 
>> >   
>> >>  
>> >>>
>> >>> But you're right, I should at least also edit the ABI description of
>> >>> this attribute. We can postpone this discussion for a future series.
>> >>>     
>> >>>>
>> >>>> Jonathan    
>> >>>     
>> >>  
>> >   
>> 

-- 
Thanks,
 ~ Kurt

  reply	other threads:[~2026-07-07  1:38 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-28  5:36 [PATCH v2 0/7] iio: adc: Add TI ADS126X ADC family support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 1/7] dt-bindings: iio: adc: Add TI ADS126x ADC family Kurt Borja
2026-06-28 15:45   ` David Lechner
2026-06-28 19:12     ` Kurt Borja
2026-06-29 14:21       ` David Lechner
2026-06-29 16:27         ` Kurt Borja
2026-06-29 16:43           ` David Lechner
2026-06-30 17:14             ` Kurt Borja
2026-06-30 18:38               ` David Lechner
2026-07-01  0:28                 ` Jonathan Cameron
2026-06-28  5:36 ` [PATCH v2 2/7] iio: adc: Add ti-ads1262 driver Kurt Borja
2026-06-28 17:15   ` David Lechner
2026-06-28 20:00     ` Kurt Borja
2026-06-29 14:38       ` David Lechner
2026-06-30  0:32         ` Jonathan Cameron
2026-06-30 17:17           ` Kurt Borja
2026-06-30  0:28     ` Jonathan Cameron
2026-06-30  0:43   ` Jonathan Cameron
2026-06-28  5:36 ` [PATCH v2 3/7] iio: adc: ti-ads1262: Add channel filter support Kurt Borja
2026-06-28  5:36 ` [PATCH v2 4/7] iio: adc: ti-ads1262: Add excitation current support Kurt Borja
2026-06-30  0:47   ` Jonathan Cameron
2026-06-30 17:18     ` Kurt Borja
2026-06-28  5:36 ` [PATCH v2 5/7] iio: adc: ti-ads1262: Add conversion delay support Kurt Borja
2026-06-30  0:50   ` Jonathan Cameron
2026-06-30 17:23     ` Kurt Borja
2026-06-30 18:44       ` David Lechner
2026-07-01  0:20         ` Jonathan Cameron
2026-07-06 16:19           ` David Lechner
2026-07-06 17:23             ` Jonathan Cameron
2026-07-07  1:38               ` Kurt Borja [this message]
2026-07-07  2:06                 ` Jonathan Cameron
2026-06-28  5:36 ` [PATCH v2 6/7] iio: adc: ti-ads1262: Add buffer and trigger support Kurt Borja
2026-06-30  0:54   ` Jonathan Cameron
2026-06-28  5:36 ` [PATCH v2 7/7] iio: adc: Add ti-ads1263-adc2 driver Kurt Borja
2026-06-28 17:22   ` David Lechner
2026-06-28 20:08     ` Kurt Borja
2026-06-29 16:38       ` David Lechner
2026-06-30  1:00         ` Jonathan Cameron
2026-06-30 17:57           ` Kurt Borja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DJRYEEGVFY2A.2115GKK5BG36M@gmail.com \
    --to=kuurtb@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox