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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250816174030.124d280c@jic23-huawei>
Date: Sat, 16 Aug 2025 17:40:30 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: <robh@...nel.org>, <conor+dt@...nel.org>, <linux-iio@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 2/5] iio: add power and energy measurement modifiers

On Fri, 15 Aug 2025 09:56:35 +0000
Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:

> Add new IIO modifiers to support power and energy measurement devices:
> 
> 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
> - IIO_MOD_FUND_REACTIVE: Reactive power at fundamental frequency
> - IIO_MOD_FACTOR: Power factor (ratio of active to apparent power)
> 
> Signal quality modifiers:
> - IIO_MOD_RMS: Root Mean Square value
> 
> These modifiers enable proper representation of power measurement
> devices like energy meters and power analyzers.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
> ---
> changes in v4:
>  - add proper KernelVersion and Contact fields to ABI documentation
>  - add detailed description for power factor measurement
>  - add altcurrent RMS measurement support
>  Documentation/ABI/testing/sysfs-bus-iio | 27 +++++++++++++++++++++++++
>  drivers/iio/industrialio-core.c         |  5 +++++
>  include/linux/iio/types.h               |  1 +
>  include/uapi/linux/iio/types.h          |  4 ++++
>  4 files changed, 37 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 2fb2cea4b192..9d283b23d3c0 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -167,7 +167,17 @@ Description:
>  		is required is a consistent labeling.  Units after application
>  		of scale and offset are millivolts.
>  
> +What:		/sys/bus/iio/devices/iio:deviceX/in_altvoltageY_rms_raw
> +KernelVersion:	6.15

That was a while back. Will be at least 6.18 unless this was hiding in use in
a driver that I didn't notice.

> +Contact:	linux-iio@...r.kernel.org
> +Description:
> +		Raw (unscaled) RMS voltage measurement from

Spell out RMS so
		Raw (unscaled) Root Mean Square (RMS) voltge measurement from

Also wrapping is odd.  Match rest of file.


> +What:		/sys/bus/iio/devices/iio:deviceX/in_powerY_powerfactor
> +KernelVersion:	6.15

6.18

> +Contact:	linux-iio@...r.kernel.org
> +Description:
> +		Power factor measurement from channel Y. Power factor is the
> +		ratio of active power to apparent power. The value is unitless.
> +
>  What:		/sys/bus/iio/devices/iio:deviceX/in_capacitanceY_raw
>  KernelVersion:	3.2
>  Contact:	linux-iio@...r.kernel.org
> @@ -1569,6 +1586,9 @@ Description:

>  
> +What:		/sys/bus/iio/devices/iio:deviceX/in_altcurrentY_rms_raw
> +KernelVersion:	6.15
> +Contact:	linux-iio@...r.kernel.org
> +Description:
> +		Raw (unscaled no bias removal etc.) RMS current measurement from
> +		channel Y. Units after application of scale and offset are milliamps.
As above.

Otherwise all looks good to me.

Jonathan

> +
>  What:		/sys/.../iio:deviceX/in_energy_en
>  What:		/sys/.../iio:deviceX/in_distance_en
>  What:		/sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_en


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ