lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250724140940.2d9b4a1f@jic23-huawei>
Date: Thu, 24 Jul 2025 14:09:40 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: David Lechner <dlechner@...libre.com>
Cc: Antoniu Miclaus <antoniu.miclaus@...log.com>, robh@...nel.org,
 conor+dt@...nel.org, devicetree@...r.kernel.org, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] iio: add power and energy measurement modifiers

On Fri, 11 Jul 2025 14:23:14 -0500
David Lechner <dlechner@...libre.com> wrote:

> On 7/11/25 8:02 AM, Antoniu Miclaus wrote:
> > Add new IIO modifiers to support power and energy measurement devices:
> >

Sorry I'm late to the game.  Busy few weeks :(
 
> > Power modifiers:
> > - IIO_MOD_ACTIVE: Real power consumed by the load
> > - IIO_MOD_REACTIVE: Power that oscillates between source and load
> > - IIO_MOD_APPARENT: Magnitude of complex power  
> 
> These make sense a modifiers since they are components of a single
> measured value.

Agreed. Oddly I thought we already had these.  Maybe there was a proposal
at some point that never got adopted. Maybe I just had a nightmare



> 
> > - IIO_MOD_FUND_REACTIVE: Reactive power at fundamental frequency  
> 
> This one seems like there should just be a separate channel
> with IIO_POWER + IIO_MOD_REACTIVE since it is measuring a different
> value.

Hmm. This one is new to me. A separate channels sounds fine to me
with a label to provide the info on what it is.

> 
> > - IIO_MOD_FACTOR: Power factor (ratio of active to apparent power)  
> 
> Power factor seems like it should be a IIO_CHAN_INFO_ rather than
> IIO_MOD_. It is also unitless, so doesn't make sense to be part
> of power_raw which would imply that it shuold be converted to Watts.

Agreed.

> 
> > 
> > Energy modifiers:
> > - IIO_MOD_ACTIVE_ACCUM: Accumulated active energy
> > - IIO_MOD_APPARENT_ACCUM: Accumulated apparent energy
> > - IIO_MOD_REACTIVE_ACCUM: Accumulated reactive energy  
> 
> As below, this one seems like there should be a separate
> energy channel for accumulated energy.

What sort of energy measurement isn't accumulated?  If it's
divided by time then it's power anyway.


> 
> > 
> > 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?

> 
> > - IIO_MOD_SWELL: Voltage swell detection
> > - IIO_MOD_DIP: Voltage dip (sag) detection  
> 
> These sound like events, not modifiers.
Agreed.  Those look fun.


> >  What:		/sys/bus/iio/devices/iio:deviceX/in_capacitanceY_raw
> >  KernelVersion:	3.2
> >  Contact:	linux-iio@...r.kernel.org
> > @@ -1593,6 +1603,12 @@ Description:
> >  
> >  What:		/sys/.../iio:deviceX/in_energy_input
> >  What:		/sys/.../iio:deviceX/in_energy_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_active_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_reactive_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_apparent_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_active_accum_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_reactive_accum_raw
> > +What:		/sys/.../iio:deviceX/in_energyY_apparent_accum_raw  
> 
> I think the accumulated would just be a separate channel, not a modifier.

I'm confused what energy is vs accumulated energy. 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ