From: Jonathan Cameron <jic23@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <robh@kernel.org>, <conor+dt@kernel.org>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 2/5] iio: add power and energy measurement modifiers
Date: Sat, 16 Aug 2025 17:40:30 +0100 [thread overview]
Message-ID: <20250816174030.124d280c@jic23-huawei> (raw)
In-Reply-To: <20250815095713.9830-3-antoniu.miclaus@analog.com>
On Fri, 15 Aug 2025 09:56:35 +0000
Antoniu Miclaus <antoniu.miclaus@analog.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@analog.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@vger.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@vger.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@vger.kernel.org
> @@ -1569,6 +1586,9 @@ Description:
>
> +What: /sys/bus/iio/devices/iio:deviceX/in_altcurrentY_rms_raw
> +KernelVersion: 6.15
> +Contact: linux-iio@vger.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
next prev parent reply other threads:[~2025-08-16 16:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 9:56 [PATCH v4 0/5] iio: adc: add support for ADE9000 Energy Monitoring IC Antoniu Miclaus
2025-08-15 9:56 ` [PATCH v4 1/5] iio: add IIO_ALTCURRENT channel type Antoniu Miclaus
2025-08-15 9:56 ` [PATCH v4 2/5] iio: add power and energy measurement modifiers Antoniu Miclaus
2025-08-16 16:40 ` Jonathan Cameron [this message]
2025-08-15 9:56 ` [PATCH v4 3/5] dt-bindings: iio: adc: add ade9000 Antoniu Miclaus
2025-08-16 16:52 ` Jonathan Cameron
2025-08-20 21:03 ` Rob Herring
2025-08-25 9:57 ` Jonathan Cameron
2025-08-20 20:58 ` Rob Herring
2025-08-15 9:56 ` [PATCH v4 4/5] iio: adc: add ade9000 support Antoniu Miclaus
2025-08-16 19:08 ` Jonathan Cameron
2025-08-15 9:56 ` [PATCH v4 5/5] Documentation: ABI: iio: add sinc4+lp Antoniu Miclaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250816174030.124d280c@jic23-huawei \
--to=jic23@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox