[PATCH 0/3] Add ADE9078 Driver

chegbeli
2022-02-17T13:52:11Z

The ADE9078 is a highly accurate, fully integrated energy metering
device. It allows the monitoring of three independent phases
simultaneously, by using seven high performances ADCs and a flexible
DSP core for a fixed fundamental signal frequency.

Datasheet:
www.analog.com/media/en/technical-documentation/data-sheets/ADE9078.pdf

NOTE:
Given the unique nature of this type of ADC a new sub-folder has been
created in the driver/iio/ section. This folder would serve as a
location for energy meters.

This series of patches provide an initial implementation of the
driver with access from the userspace to the:
- For each active phase from the device tree:
- Current (read raw, read scale, set hwgain)
- Voltage (read raw, read scale, set hwgain)
- Current RMS (read raw, read scale, set offset)
- Voltage RMS (read raw, read scale, set offset)
- Active Power (read raw, read scale, set hwgain, set offset)
- Reactive Power (read raw, read scale, set offset)
- Apparent Power (read raw, read scale)
- Fundamental Active Power (read raw, read scale, set offset)
- Apparent Power (read raw, read scale)
- Event control for zero-crossing events on Voltage and Current
- Buffer implementation for read out of the internal FIFO

chegbeli (3):
iio: add meter subdirectory
dt-bindings: iio: add ADE9078
iio: meter: add ADE9078 driver

.../bindings/iio/meter/adi,ade9078.yaml | 153 ++
MAINTAINERS | 8 +
drivers/iio/Kconfig | 1 +
drivers/iio/Makefile | 1 +
drivers/iio/meter/Kconfig | 22 +
drivers/iio/meter/Makefile | 7 +
drivers/iio/meter/ade9078.c | 1666 +++++++++++++++++
include/dt-bindings/iio/meter/adi,ade9078.h | 21 +
8 files changed, 1879 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/meter/adi,ade9078.yaml
create mode 100644 drivers/iio/meter/Kconfig
create mode 100644 drivers/iio/meter/Makefile
create mode 100644 drivers/iio/meter/ade9078.c
create mode 100644 include/dt-bindings/iio/meter/adi,ade9078.h

--
2.34.1