[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d1af7490-5d91-4b30-a86f-8df3a8d17af7@baylibre.com>
Date: Tue, 25 Feb 2025 09:26:56 -0600
From: David Lechner <dlechner@...libre.com>
To: Nuno Sá <noname.nuno@...il.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>, jic23@...nel.org,
robh@...nel.org, conor+dt@...nel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/14] Documentation: ABI: testing: ad4080 docs
On 2/25/25 3:16 AM, Nuno Sá wrote:
> On Thu, 2025-02-20 at 12:27 -0600, David Lechner wrote:
>> On 2/20/25 8:53 AM, Nuno Sá wrote:
>>> On Thu, 2025-02-20 at 15:54 +0200, Antoniu Miclaus wrote:
...
>>>> +
>>>> +What: /sys/bus/iio/devices/iio:deviceX/sinc_dec_rate
>>>> +Date: February 2025
>>>> +KernelVersion:
>>>> +Contact: linux-iio@...r.kernel.org
>>>> +Description:
>>>> + Set the filter’s decimation rate.
>>>> +
>>>> +What: /sys/bus/iio/devices/iio:deviceX/sinc_dec_rate_available
>>>> +Date: February 2025
>>>> +KernelVersion:
>>>> +Contact: linux-iio@...r.kernel.org
>>>> +Description:
>>>> + Return the available filter's decimation rates.
>>>> +
>>>> +
>>>
>>> I'm not yet convinced we need the dec_rate custom attr. I'll add more
>>> comments
>>> in the driver.
>>
>> If we do need it, in another driver recently we concluded that
>> decimation rate is the same as oversampling ratio and there is
>> already a standard attribute for oversampling ratio, so we used
>> that.
>>
>
> Yeah, in theory decimation is about averaging samples. Makes sense to me even
> though I never thought about using the oversampling ratio attr. I was biased by
> the IMUs drivers where we configure the dec_rate as part of the sampling
> frequency attr since these filters directly affect the chip ODR.
>
> Out of curiosity, how did you handled this in the other driver? I would be
> tempted to only allow reading the sampling frequency attribute which means that
> the oversampling ratio attr is the one we can write (which then directly affects
> sampling frequency).
>
> - Nuno Sá
The other driver is still under review:
https://lore.kernel.org/linux-iio/2c3ce1701545e435238605342397e45657a0fb2a.1739368121.git.Jonathan.Santos@analog.com/
It is modifying an existing driver, so in that case, we still have to preserve
writing to sampling_frequency even if that isn't the ideal way to set it up.
Powered by blists - more mailing lists