]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: add power and energy measurement modifiers
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Mon, 8 Sep 2025 07:35:22 +0000 (07:35 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 13 Sep 2025 12:47:19 +0000 (13:47 +0100)
commit70da02061499ca89ab92f7c4310f815d5fe674ec
treefaca7e43e7e8ddb31edc8d2f1c5eaf4f7bbb1e2e
parentf15bc37d8c336e79491209b268e73868c44733c4
iio: add power and energy measurement modifiers

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

Signal quality modifiers:
- IIO_MOD_RMS: Root Mean Square value

Additionally adds:
- IIO_CHAN_INFO_POWERFACTOR: Power factor channel info type for
  representing the ratio of active power to apparent power

These modifiers enable proper representation of power measurement
devices like energy meters and power analyzers.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/linux/iio/types.h
include/uapi/linux/iio/types.h
tools/iio/iio_event_monitor.c