Re: [PATCH 1/3] iio: add power and energy measurement modifiers

From: Jonathan Cameron
Date: Sun Jul 27 2025 - 09:18:05 EST


On Thu, 24 Jul 2025 08:58:48 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:

> On 7/24/25 8:09 AM, Jonathan Cameron wrote:
> > On Fri, 11 Jul 2025 14:23:14 -0500
> > David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> >
> >> On 7/11/25 8:02 AM, Antoniu Miclaus wrote:
> >>> Add new IIO modifiers to support power and energy measurement devices:
> >>>
>
> ...
>
> >
> >>
> >>>
> >>> Signal quality modifiers:
> >>> - IIO_MOD_RMS: Root Mean Square value
> >>
> >> Suprised we don't have something like this already. altvoltageY isn't
> >> clear about if the value is peak-to-peak or RMS.
> >
> > Hohum.. My vague recollection is peak to peak, but oops we should
> > have documented that better. Someone want to audit existing drivers?
> >
> >>
>
> I did audit them (which is what lead to the Q/I modifier cleanup
> in the ABI docs). Most drivers are just using the frequency and/or
> phase components. The ads1210 uses peak-to-peak (I should know, I
> wrote the driver :-p). The envelope-detector driver mentions high
> and low when making an altvoltage_raw measurement so that sounds
> like peak-to-peak as well. There are a couple of frequency drivers
> that also have altvoltage_raw, but I didn't look as closely at
> them.

Cool. If you have time please send a docs update.

Thanks,

Jonathan