Re: [PATCH v2 3/4] staging: iio: magnetometer: Add QST QMC5883P driver

From: Hardik Phalet

Date: Sun Apr 19 2026 - 10:30:53 EST


On Mon Apr 13, 2026 at 12:22 AM IST, David Lechner wrote:
> On 4/12/26 4:54 AM, Hardik Phalet wrote:
>> On Sat Apr 11, 2026 at 1:32 AM IST, David Lechner wrote:
>>> On 4/9/26 4:07 PM, Hardik Phalet wrote:
>>>
>>> This is a little bit much to review all in one patch. Could be nice
>>> to split out power management to a separate patch.
>>>
>
> ...
>
>>>> +static IIO_DEVICE_ATTR(downsampling_ratio, 0644, downsampling_ratio_show,
>>>> + downsampling_ratio_store, 0);
>>>> +static IIO_CONST_ATTR(downsampling_ratio_available, "1 2 4 8");
>>>
>>> As mentioned in the cover letter, we'd like to know more about what
>>> this actually does. If there is a good reason it doesn't fit with
>>> any existing filter attribute, then we'll need a patch to document
>>> the sysfs ABI as well.
>>>
>> In the device datasheet, OSR2("Down sampling ratio") is mentioned like this:
>> "Another filter is added for better noise performance; the depth can be
>> adjusted through OSR2". OSR2's defintion is called "down sampling ratio"
>> in a table. Nowhere else. I didn't know what attribute to map it to in
>> this case.
>>
> I wonder if there is an application note or something that explains it
> in more detail if the datasheet does not.
>
I could not find any mention of it, in an application note or otherwise.
I cannot confirm what this does, unless I get an oscilloscope and figure
it out.

> We could always omit the feature if no one knows what it actually does.
Yes that's what I am planning to do.

Regards,
Hardik