Re: [PATCH v3 2/9] iio: adc: add the ti-ads1262 driver

From: David Lechner

Date: Wed Aug 12 2026 - 09:50:36 EST


On 8/11/26 3:28 PM, Kurt Borja wrote:
> On Mon Aug 10, 2026 at 11:42 AM -05, David Lechner wrote:
>> On 8/9/26 3:26 AM, Kurt Borja wrote:
>>> On Sat Aug 8, 2026 at 1:39 PM -05, David Lechner wrote:
>>>> On 8/7/26 10:58 PM, Kurt Borja wrote:
>>>>> Add the ti-ads1262 driver with initial support for the primary ADC
>>>>> (ADC1). The ADS1263 auxiliary ADC (ADC2) is handled by a separate driver
>>>>> and interoperability considerations were taken into account.
>>>>
>>
>> ...
>>
>>>>> +static int ads1262_dev_reset(struct ads1262 *st)
>>>>> +{
>>>>> + int ret;
>>>>> +
>>>>> + if (st->reset_gpiod) {
>>>>> + ret = gpiod_set_value_cansleep(st->reset_gpiod, 1);
>>>>> + if (ret)
>>>>> + return ret;
>>>>> +
>>>>> + /*
>>>>> + * The RESET pulse timing requirement is 4 clock cycles, at the
>>>>> + * minimum clock rate this is 4 microseconds.
>>>>> + */
>>>>> + fsleep(4);
>>>>
>>>> How long do we have to hold reset before the chip powers down?
>>>
>>> For power down 65536 clk cycles. Less than that is simple reset.
>>
>> How long is 65536 clk cycles in microseconds at the fasted clock rate?
>> Hopefully won't accidentally shut down the chip here even if fsleep()
>> goes significantly longer than requested.
>
> That would be 8192 microseconds. Do you think there is a risk we end up
> turning off the device?
>
Linux is not a realtime system, so yes technically it is possible. It
would probably be hard to do in practice though. So hopefully not
something we have to worry about.

If it did get put to sleep here, how does it get turned back on?