iio: adc: ade9000: add support for ADE9078
Subsystems (5)
Antoniu Miclaus
maintainerv2 cover iio: adc: ade9000: add support for ADE9078
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000 and is register compatible with it. The main differences relevant to the driver are the absence of the on-chip dip/swell detection, a lower maximum SPI clock (10 MHz), and slightly different full-scale ADC codes.
This series adds support for the ADE9078 to the existing ade9000 driver. It first refactors the driver to move the part-specific values (device name, channel table, and full-scale codes) into a chip_info structure retrieved via device match data, then adds the new device tree compatible and the ADE9078 support itself, and finally updates the documentation.
Changes in v2:
- move the "respective datasheets" comment wording to avoid churn.
- use a generic Kconfig title and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.
v1: https://lore.kernel.org/linux-iio/<FILL-IN-v1-MESSAGE-ID>/
Antoniu Miclaus (4):
iio: adc: ade9000: introduce chip_info structure
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
iio: adc: ade9000: add support for ADE9078
docs: iio: ade9000: document ADE9078 support
.../bindings/iio/adc/adi,ade9000.yaml | 30 ++- Documentation/iio/ade9000.rst | 28 +-- drivers/iio/adc/Kconfig | 16 +- drivers/iio/adc/ade9000.c | 180 ++++++++++++------ 4 files changed, 175 insertions(+), 79 deletions(-)
base-commit: 0b5e142ced4bcf20532da051934bd694d1bbd470
Signature · 1 line
2.43.0
Antoniu Miclaus
maintainerPATCH v2 1/4 iio: adc: ade9000: introduce chip_info structure
The driver currently hardcodes the device name and the full-scale ADC codes used to derive the IIO scale attributes. In preparation for supporting additional parts of the ADE9000 family, move these part-specific values into a new struct ade9000_chip_info and retrieve it via spi_get_device_match_data() at probe time.
The channel table and its size are also referenced through the chip_info so that parts with a different channel layout can be added without touching the probe path.
No functional change intended for the ADE9000.
---
Changes in v2:
- introduce the "respective datasheets" comment wording here to avoid churn in the ADE9078 patch.
drivers/iio/adc/ade9000.c | 63 +++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 16 deletions(-)
drivers/iio/adc/ade9000.c +47 -16
@@ -242,14 +242,6 @@#define ADE9000_LAST_PAGE_BIT BIT(15)#define ADE9000_MIDDLE_PAGE_BIT BIT(7) -/* -* Full scale Codes referred from Datasheet. Respective digital codes are -* produced when ADC inputs are at full scale. -*/ -#define ADE9000_RMS_FULL_SCALE_CODES 52866837 -#define ADE9000_WATT_FULL_SCALE_CODES 20694066 -#define ADE9000_PCF_FULL_SCALE_CODES 74770000 -/* Phase and channel definitions */ #define ADE9000_PHASE_A_NR 0#define ADE9000_PHASE_B_NR 1
@@ -290,7 +282,29 @@ enum ade9000_wfb_cfg {#define ADE9000_ADDR_ADJUST (addr, chan) \ (((chan) == 0 ? 0 : (chan) == 1 ? 2 : 4) << 4 | (addr)) +/** +* struct ade9000_chip_info - part-specific configuration +* @name: IIO device name reported to userspace +* @channels: channel specification for this part +* @num_channels: number of entries in @channels +* @rms_full_scale_codes: digital code produced at full-scale RMS input +* @watt_full_scale_codes: digital code produced at full-scale power input +* @pcf_full_scale_codes: digital code produced at full-scale xI_PCF/xV_PCF input +* +* The full-scale codes are taken from the respective datasheets and are used to +* derive the IIO scale of the raw measurement channels. +*/ +struct ade9000_chip_info { +const char *name; +const struct iio_chan_spec *channels; +unsigned int num_channels; +unsigned int rms_full_scale_codes; +unsigned int watt_full_scale_codes; +unsigned int pcf_full_scale_codes; +}; +struct ade9000_state { +const struct ade9000_chip_info *info;struct completion reset_completion;struct mutex lock;/* Protects SPI transactions */ u8 wf_src;
@@ -623,6 +637,19 @@ static const struct iio_chan_spec ade9000_channels[] = { ADE9000_POWER_FACTOR_CHANNEL(ADE9000_PHASE_C_NR), }; +/* +* Full-scale codes referred from the respective datasheets. These are the +* digital codes produced when the ADC inputs are at full scale. +*/ +static const struct ade9000_chip_info ade9000_chip_info = { + .name ="ade9000" , + .channels = ade9000_channels, + .num_channels =ARRAY_SIZE (ade9000_channels), + .rms_full_scale_codes =52866837 , + .watt_full_scale_codes =20694066 , + .pcf_full_scale_codes =74770000 , +}; +static const struct reg_sequence ade9000_initialization_sequence[] = { {ADE9000_REG_PGA_GAIN ,ADE9000_PGA_GAIN }, {ADE9000_REG_CONFIG0 ,ADE9000_CONFIG0 },
@@ -1064,7 +1091,7 @@ static int ade9000_read_raw(struct iio_dev *indio_dev,case ADE9000_REG_CI_PCF :case ADE9000_REG_CV_PCF : *val =1 ; - *val2 =ADE9000_PCF_FULL_SCALE_CODES ; + *val2 = st->info->pcf_full_scale_codes;return IIO_VAL_FRACTIONAL ;case ADE9000_REG_AIRMS :case ADE9000_REG_AVRMS :
@@ -1073,14 +1100,14 @@ static int ade9000_read_raw(struct iio_dev *indio_dev,case ADE9000_REG_CIRMS :case ADE9000_REG_CVRMS : *val =1 ; - *val2 =ADE9000_RMS_FULL_SCALE_CODES ; + *val2 = st->info->rms_full_scale_codes;return IIO_VAL_FRACTIONAL ;default :return -EINVAL ; }case IIO_POWER : *val =1 ; - *val2 =ADE9000_WATT_FULL_SCALE_CODES ; + *val2 = st->info->watt_full_scale_codes;return IIO_VAL_FRACTIONAL ;default :break ;
@@ -1692,6 +1719,10 @@ static int ade9000_probe(struct spi_device *spi) st =iio_priv (indio_dev); + st->info =spi_get_device_match_data (spi); +if (!st->info) +return -ENODEV ; + regmap =devm_regmap_init (dev,NULL , st, &ade9000_regmap_config);if (IS_ERR (regmap))return dev_err_probe (dev,PTR_ERR (regmap),"Unable to allocate ADE9000 regmap" );
@@ -1726,7 +1757,7 @@ static int ade9000_probe(struct spi_device *spi)if (ret)return ret; - indio_dev->name ="ade9000" ; + indio_dev->name = st->info->name; indio_dev->info = &ade9000_info; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->setup_ops = &ade9000_buffer_ops;
@@ -1736,8 +1767,8 @@ static int ade9000_probe(struct spi_device *spi)return dev_err_probe (&spi->dev, ret,"Failed to get and enable vdd regulator\n" ); - indio_dev->channels = ade9000_channels; - indio_dev->num_channels =ARRAY_SIZE (ade9000_channels); + indio_dev->channels = st->info->channels; + indio_dev->num_channels = st->info->num_channels; ret =devm_iio_kfifo_buffer_setup (dev, indio_dev, &ade9000_buffer_ops);
@@ -1768,13 +1799,13 @@ static int ade9000_probe(struct spi_device *spi) };static const struct spi_device_id ade9000_id[] = { - { .name ="ade9000" }, + { .name ="ade9000" , .driver_data = (kernel_ulong_t)&ade9000_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ade9000_id);static const struct of_device_id ade9000_of_match[] = { - { .compatible ="adi,ade9000" }, + { .compatible ="adi,ade9000" , .data = &ade9000_chip_info }, { } };MODULE_DEVICE_TABLE (of, ade9000_of_match);
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v2 1/4] iio: adc: ade9000: introduce chip_info structure
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Hardware interrupts are requested before the device is powered up and reset. --
--- Patch [1]: [PATCH v2 1/4] iio: adc: ade9000: introduce chip_info structure --- commit 00acfaee941c3f163617be410fa26e35179f3ffc
Author: Antoniu Miclaus <[email protected]>
iio: adc: ade9000: introduce chip_info structure
The driver currently hardcodes the device name and the full-scale ADC codes used to derive the IIO scale attributes. In preparation for supporting additional parts of the ADE9000 family, move these part-specific values into a new struct ade9000_chip_info and retrieve it via spi_get_device_match_data() at probe time.
Quoted 4 lines
drivers/iio/adc/ade9000.c +0
-0
[ ... ]
drivers/iio/adc/ade9000.c static int ade9000_probe(struct spi_device *spi)
Quoted 10 lines
drivers/iio/adc/ade9000.c +1
-1@@ -1726,7 +1757,7 @@ static int ade9000_probe(struct spi_device *spi)if (ret)return ret; - indio_dev->name ="ade9000" ; + indio_dev->name = st->info->name; indio_dev->info = &ade9000_info; indio_dev->modes =INDIO_DIRECT_MODE ; indio_dev->setup_ops = &ade9000_buffer_ops;@@ -1736,8 +1767,8 @@ static int ade9000_probe(struct spi_device *spi)
[Severity: High]
This is a pre-existing issue, but could we look at the interrupt initialization ordering here?
Hardware interrupts are requested via devm_request_threaded_irq() without IRQF_NO_AUTOEN earlier in ade9000_probe(), before this vdd regulator is enabled.
If an interrupt line is active (for example, pulled low by the unpowered chip or floating) at boot time, wouldn't the unmasked handler like ade9000_irq1_thread() run immediately?
If that happens, the handler might attempt SPI register accesses while the chip is still unpowered. Could this lead to SPI bus errors, controller timeouts, or reading garbage data?
If that garbage data happens to have the ADE9000_ST1_RSTDONE_BIT set, could it prematurely complete the reset process and lead to driver initialization failure?
Quoted 10 lines
drivers/iio/adc/ade9000.c +2
-2return dev_err_probe (&spi->dev, ret,"Failed to get and enable vdd regulator\n" ); - indio_dev->channels = ade9000_channels; - indio_dev->num_channels =ARRAY_SIZE (ade9000_channels); + indio_dev->channels = st->info->channels; + indio_dev->num_channels = st->info->num_channels; ret =devm_iio_kfifo_buffer_setup (dev, indio_dev, &ade9000_buffer_ops);
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Antoniu Miclaus
maintainerPATCH v2 2/4 dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
In reply to Antoniu MiclausThe ADE9078 is a polyphase energy metering device from the same family as the ADE9000. It is register-compatible with the ADE9000 but does not provide the on-chip dip/swell detection and is limited to a 10 MHz SPI clock.
Add the new compatible along with a conditional constraint lowering the maximum spi-max-frequency for the ADE9078.
---
no changes in v2.
.../bindings/iio/adc/adi,ade9000.yaml | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-)
Documentation/devicetree/bindings/iio/adc/adi,ade9000.yaml +22 -8
@@ -5,21 +5,23 @@ $id: http://devicetree.org/schemas/iio/adc/adi,ade9000.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Analog Devices ADE9000 High Performance, Polyphase Energy Metering +title: Analog Devices ADE9000/ADE9078 High Performance, Polyphase Energy Metering maintainers: - Antoniu Miclaus <[email protected]> description: | - The ADE9000 is a highly accurate, fully integrated, multiphase energy and power - quality monitoring device. Superior analog performance and a digital signal - processing (DSP) core enable accurate energy monitoring over a wide dynamic - range. An integrated high end reference ensures low drift over temperature - with a combined drift of less than ±25 ppm/°C maximum for the entire channel - including a programmable gain amplifier (PGA) and an analog-to-digital - converter (ADC). + The ADE9000 and ADE9078 are highly accurate, fully integrated, multiphase + energy and power quality monitoring devices. Superior analog performance and a + digital signal processing (DSP) core enable accurate energy monitoring over a + wide dynamic range. An integrated high end reference ensures low drift over + temperature with a combined drift of less than ±25 ppm/°C maximum for the + entire channel including a programmable gain amplifier (PGA) and an + analog-to-digital converter (ADC). The ADE9078 does not provide the on-chip + dip/swell detection available on the ADE9000. https://www.analog.com/media/en/technical-documentation/data-sheets/ADE9000.pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/ADE9078.pdf $ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -27,6 +29,7 @@ properties: compatible: enum: - adi,ade9000 + - adi,ade9078 reg: maxItems: 1
@@ -67,6 +70,17 @@ required: - reg - vdd-supply +allOf: + - if: + properties: + compatible: + contains: + const: adi,ade9078 + then: + properties: + spi-max-frequency: + maximum: 10000000 + unevaluatedProperties: false examples:
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v2 2/4] dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] The IIO channels for Phase B and Phase C have overlapping scan_index values, causing them to conflict in the IIO buffer and preventing correct channel configuration.
- [High] The IRQ1 handler loop stops at bit 24, completely ignoring Phase C dip events (ADE9000_ST1_DIPC_BIT) which are located at bit 25.
--
--- Patch [2]: [PATCH v2 2/4] dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible --- commit fea768d482e94a570394d820d69e5c756bc56362
Author: Antoniu Miclaus <[email protected]>
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
This commit adds the ADE9078 compatible string to the ADE9000 binding and lowers the maximum spi frequency for the new variant.
Quoted 4 lines
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000. It is register-compatible with the ADE9000 but does not provide the on-chip dip/swell detection and is limited to a 10 MHz SPI clock.
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the ADE9000 driver family, I noticed a potential conflict with the channel configurations.
Looking at drivers/iio/adc/ade9000.c:
#define ADE9000_CURRENT_CHANNEL(num) { \
...
.scan_index = num,
...
#define ADE9000_VOLTAGE_CHANNEL(num) { \
...
.scan_index = num + 1, /* interleave with current channels */
Does this cause Phase A Voltage (index 1) to conflict with Phase B Current (index 1), and Phase B Voltage (index 2) to conflict with Phase C Current (index 2)?
When a user enables Phase B or C channels via sysfs, it seems this could cause the active_scan_mask to map to the wrong bits. Could this lead to an unsupported combination of scans or incorrect channel configuration in ade9000_waveform_buffer_config():
bitmap_to_arr32(&active_scans, indio_dev->active_scan_mask,
iio_get_masklength(indio_dev));
switch (active_scans) {
case ADE9000_SCAN_POS_IA | ADE9000_SCAN_POS_VA:[Severity: High]
This is also a pre-existing issue, but I noticed a potential problem with the Phase C dip detection logic.
Looking at drivers/iio/adc/ade9000.c:
#define ADE9000_ST1_CROSSING_DEPTH 25
...
#define ADE9000_ST1_DIPC_BIT BIT(25)
And later in ade9000_irq1_thread():
bitmap_from_arr32(interrupt_bits, &interrupts, ADE9000_ST1_CROSSING_DEPTH);
for_each_set_bit_from(bit, interrupt_bits,
ADE9000_ST1_CROSSING_DEPTH) {
tmp = status & BIT(bit);Since ADE9000_ST1_CROSSING_DEPTH is 25, will these operations only handle bits 0 through 24? Does this mean bit 25 is missed and Phase C dip events are silently ignored when the hardware triggers an IRQ1?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH v2 2/4] dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
In reply to Antoniu MiclausQuoted 5 lines · Antoniu Miclaus
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000. It is register-compatible with the ADE9000 but does not provide the on-chip dip/swell detection and is limited to a 10 MHz SPI clock.
Quoted 9 lines
Add the new compatible along with a conditional constraint lowering the maximum spi-max-frequency for the ADE9078.
Signed-off-by Antoniu Miclaus <[email protected]>---
no changes in v2..../bindings/iio/adc/adi,ade9000.yaml | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-)
Antoniu Miclaus
maintainerPATCH v2 3/4 iio: adc: ade9000: add support for ADE9078
In reply to Antoniu MiclausThe ADE9078 is a polyphase energy metering device that is register compatible with the ADE9000. The main differences relevant to the driver are the absence of the on-chip dip/swell detection and slightly different full-scale ADC codes.
Add a dedicated channel table that omits the swell/dip voltage events and a matching chip_info describing the ADE9078 full-scale codes. A separate RMS voltage channel macro variant is added that drops the swell/dip event spec so the ADE9078 channel table can omit those events.
---
Changes in v2:
- use a generic Kconfig title and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.
- drop the full-scale codes comment change and reword the commit message.
drivers/iio/adc/Kconfig | 16 ++--- drivers/iio/adc/ade9000.c | 119 ++++++++++++++++++++++++++------------ 2 files changed, 90 insertions(+), 45 deletions(-)
drivers/iio/adc/Kconfig +9 -7
@@ -573,20 +573,22 @@ config AD9467 called ad9467. config ADE9000 - tristate "Analog Devices ADE9000 Multiphase Energy, and Power Quality Monitoring IC Driver" + tristate "Analog Devices Multiphase Energy and Power Quality Monitoring IC Driver" depends on SPI select REGMAP_SPI select IIO_BUFFER select IIO_KFIFO_BUF help - Say yes here to build support for the Analog Devices ADE9000, - a highly accurate, multiphase energy and power quality monitoring - integrated circuit. + Say yes here to build support for the following Analog Devices + highly accurate, multiphase energy and power quality monitoring + integrated circuits: + - ADE9000 + - ADE9078 - The device features high-precision analog-to-digital converters + The devices feature high-precision analog-to-digital converters and digital signal processing to compute RMS values, power factor, - frequency, and harmonic analysis. It supports SPI communication - and provides buffered data output through the IIO framework. + frequency, and harmonic analysis. They support SPI communication + and provide buffered data output through the IIO framework. To compile this driver as a module, choose M here: the module will be called ade9000.
drivers/iio/adc/ade9000.c +81 -38
155 lines not on this page · raw message
Signature · 1 line
2.43.0
Antoniu Miclaus
maintainerPATCH v2 4/4 docs: iio: ade9000: document ADE9078 support
In reply to Antoniu MiclausAdd the ADE9078 to the list of supported devices and note that the dip/swell voltage events are only available on the ADE9000.
---
no changes in v2.
Documentation/iio/ade9000.rst | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
Documentation/iio/ade9000.rst +17 -11
@@ -1,24 +1,30 @@ .. SPDX-License-Identifier: GPL-2.0 -=============== -ADE9000 driver -=============== +====================== +ADE9000/ADE9078 driver +====================== -This driver supports Analog Device's ADE9000 energy measurement IC on SPI bus. +This driver supports Analog Device's ADE9000 and ADE9078 energy measurement +ICs on SPI bus. 1. Supported devices ==================== * `ADE9000 <https://www.analog.com/media/en/technical-documentation/data-sheets/ADE9000.pdf>`_ - -The ADE9000 is a highly accurate, fully integrated, multiphase energy and power -quality monitoring device. Superior analog performance and a digital signal -processing (DSP) core enable accurate energy monitoring over a wide dynamic -range. An integrated high end reference ensures low drift over temperature -with a combined drift of less than ±25 ppm/°C maximum for the entire channel -including a programmable gain amplifier (PGA) and an analog-to-digital +* `ADE9078 <https://www.analog.com/media/en/technical-documentation/data-sheets/ADE9078.pdf>`_ + +The ADE9000 and ADE9078 are highly accurate, fully integrated, multiphase energy +and power quality monitoring devices. Superior analog performance and a digital +signal processing (DSP) core enable accurate energy monitoring over a wide +dynamic range. An integrated high end reference ensures low drift over +temperature with a combined drift of less than ±25 ppm/°C maximum for the entire +channel including a programmable gain amplifier (PGA) and an analog-to-digital converter (ADC). +The ADE9078 does not provide the on-chip dip/swell (sag) detection available on +the ADE9000, so the RMS voltage swell/dip events described below are only +available on the ADE9000. + 2. Device attributes ====================
Signature · 1 line
2.43.0
Jonathan Cameron
maintainerQuoted 5 lines · On Fri, 31 Jul 2026 11:29:46 +0300 Antoniu Miclaus…
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000 and is register compatible with it. The main differences relevant to the driver are the absence of the on-chip dip/swell detection, a lower maximum SPI clock (10 MHz), and slightly different full-scale ADC codes.
This looks fine to me, but will need to sit on list until the dt maintainers have gotten to it. Sashiko did call out some possible preexisting issues in the driver. I haven't looked at them, but if you have some time, it may be worth a look the power vs interrupt registration one smells plausible.
https://sashiko.dev/#/patchset/20260731082951.1228-1-antoniu.miclaus%40analog.com
Quoted 28 lines
This series adds support for the ADE9078 to the existing ade9000 driver. It first refactors the driver to move the part-specific values (device name, channel table, and full-scale codes) into a
chip_infostructure retrieved via device match data, then adds the new device tree compatible and the ADE9078 support itself, and finally updates the documentation.Changes in v2:
- move the "respective datasheets" comment wording to avoid churn.
- use a genericKconfigtitle and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.v1: https://lore.kernel.org/linux-iio/<FILL-IN-v1-MESSAGE-ID>/
Antoniu Miclaus (4):
iio: adc: ade9000: introducechip_infostructure
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
iio: adc: ade9000: add support for ADE9078
docs: iio: ade9000: document ADE9078 support.../bindings/iio/adc/adi,ade9000.yaml | 30 ++- Documentation/iio/ade9000.rst | 28 +-- drivers/iio/adc/Kconfig | 16 +- drivers/iio/adc/ade9000.c | 180 ++++++++++++------ 4 files changed, 175 insertions(+), 79 deletions(-)base-commit:
0b5e142ced4bcf20532da051934bd694d1bbd470
Miclaus, Antoniu
maintainerHi Jonathan,
Quoted 29 lines
-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Sunday, August 2, 2026 4:44 AM
To: Miclaus, Antoniu <[email protected]>
Cc: Sa, Nuno <[email protected]>; Hennerich, Michael <[email protected]>; David Lechner <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Jonathan Corbet <[email protected]>; Shuah Khan <[email protected]>; Sabau, Radu bogdan <[email protected]>; Schmitt, Marcelo <[email protected]>; Marques, Jorge <[email protected]>; Salih Erim <[email protected]>; Matti Vaittinen <[email protected]>; Jishnu Prakash <[email protected]>; [email protected]; linux <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH v2 0/4] iio: adc: ade9000: add support for ADE9078[External]
Quoted 5 lines · On Fri, 31 Jul 2026 11:29:46 +0300 Antoniu Miclaus…
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000 and is register compatible with it. The main differences relevant to the driver are the absence of the on-chip dip/swell detection, a lower maximum SPI clock (10 MHz), and slightly different full-scale ADC codes.
Quoted 5 lines
This looks fine to me, but will need to sit on list until the dt maintainers have gotten to it. Sashiko did call out some possible preexisting issues in the driver. I haven't looked at them, but if you have some time, it may be worth a look the power vs interrupt registration one smells plausible.
Want me to send the fixes in a separate patch or within this series?
Quoted 35 lines
https://urldefense.com/v3/__https://sashiko.dev/*/patchset/20260731082
951.1228-1- antoniu.miclaus*40analog.com__;IyU!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_Pruv IpxZPJggP6_ge3-ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqRTn7EkeQ$Quoted 7 lines
This series adds support for the ADE9078 to the existing ade9000 driver. It first refactors the driver to move the part-specific values (device name, channel table, and full-scale codes) into a
chip_infostructure retrieved via device match data, then adds the new device tree compatible and the ADE9078 support itself, and finally updates the documentation.Quoted 6 lines
Changes in v2:
- move the "respective datasheets" comment wording to avoid churn.
- use a genericKconfigtitle and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.v1: https://urldefense.com/v3/__https://lore.kernel.org/linux-
iio/__;!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_PruvIpxZPJggP6_ge3- ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqTALKwajg$ <FILL-IN-v1- MESSAGE-ID>/
Quoted 15 lines
Antoniu Miclaus (4):
iio: adc: ade9000: introducechip_infostructure
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
iio: adc: ade9000: add support for ADE9078
docs: iio: ade9000: document ADE9078 support.../bindings/iio/adc/adi,ade9000.yaml | 30 ++- Documentation/iio/ade9000.rst | 28 +-- drivers/iio/adc/Kconfig | 16 +- drivers/iio/adc/ade9000.c | 180 ++++++++++++------ 4 files changed, 175 insertions(+), 79 deletions(-)base-commit:
0b5e142ced4bcf20532da051934bd694d1bbd470
Jonathan Cameron
maintainerQuoted 31 lines · Antoniu
Hi Jonathan,
Quoted 29 lines
-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Sunday, August 2, 2026 4:44 AM
To: Miclaus, Antoniu <[email protected]>
Cc: Sa, Nuno <[email protected]>; Hennerich, Michael <[email protected]>; David Lechner <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Jonathan Corbet <[email protected]>; Shuah Khan <[email protected]>; Sabau, Radu bogdan <[email protected]>; Schmitt, Marcelo <[email protected]>; Marques, Jorge <[email protected]>; Salih Erim <[email protected]>; Matti Vaittinen <[email protected]>; Jishnu Prakash <[email protected]>; [email protected]; linux <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH v2 0/4] iio: adc: ade9000: add support for ADE9078[External]
Quoted 5 lines · On Fri, 31 Jul 2026 11:29:46 +0300 Antoniu Miclaus…
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000 and is register compatible with it. The main differences relevant to the driver are the absence of the on-chip dip/swell detection, a lower maximum SPI clock (10 MHz), and slightly different full-scale ADC codes.
Quoted 6 lines
Quoted 5 lines
This looks fine to me, but will need to sit on list until the dt maintainers have gotten to it. Sashiko did call out some possible preexisting issues in the driver. I haven't looked at them, but if you have some time, it may be worth a look the power vs interrupt registration one smells plausible.
Want me to send the fixes in a separate patch or within this series?
Separate should be fine for any preexisting issues. I'm not going to hold this series up waiting for them (assuming we get the dt ack - it's listed on their patchwork as Needs Ack so no one has gotten to it yet).
https://patchwork.kernel.org/project/devicetree/patch/[email protected]/
Jonathan
Quoted 37 lines
Quoted 36 lines
https://urldefense.com/v3/__https://sashiko.dev/*/patchset/20260731082
951.1228-1- antoniu.miclaus*40analog.com__;IyU!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_Pruv IpxZPJggP6_ge3-ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqRTn7EkeQ$Quoted 7 lines
This series adds support for the ADE9078 to the existing ade9000 driver. It first refactors the driver to move the part-specific values (device name, channel table, and full-scale codes) into a
chip_infostructure retrieved via device match data, then adds the new device tree compatible and the ADE9078 support itself, and finally updates the documentation.Quoted 6 lines
Changes in v2:
- move the "respective datasheets" comment wording to avoid churn.
- use a genericKconfigtitle and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.v1: https://urldefense.com/v3/__https://lore.kernel.org/linux-
iio/__;!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_PruvIpxZPJggP6_ge3- ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqTALKwajg$ <FILL-IN-v1- MESSAGE-ID>/
Quoted 15 lines
Antoniu Miclaus (4):
iio: adc: ade9000: introducechip_infostructure
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
iio: adc: ade9000: add support for ADE9078
docs: iio: ade9000: document ADE9078 support.../bindings/iio/adc/adi,ade9000.yaml | 30 ++- Documentation/iio/ade9000.rst | 28 +-- drivers/iio/adc/Kconfig | 16 +- drivers/iio/adc/ade9000.c | 180 ++++++++++++------ 4 files changed, 175 insertions(+), 79 deletions(-)base-commit:
0b5e142ced4bcf20532da051934bd694d1bbd470
Jonathan Cameron
maintainerQuoted 39 lines · On Wed, 5 Aug 2026 17:45:48 +0100 Jonathan Cameron <[email protected]> wrote:
Quoted 36 lines · Antoniu
Hi Jonathan,
Quoted 34 lines
-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Sunday, August 2, 2026 4:44 AM
To: Miclaus, Antoniu <[email protected]>
Cc: Sa, Nuno <[email protected]>; Hennerich, Michael <[email protected]>; David Lechner <[email protected]>; Rob Herring <[email protected]>; Krzysztof Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Jonathan Corbet <[email protected]>; Shuah Khan <[email protected]>; Sabau, Radu bogdan <[email protected]>; Schmitt, Marcelo <[email protected]>; Marques, Jorge <[email protected]>; Salih Erim <[email protected]>; Matti Vaittinen <[email protected]>; Jishnu Prakash <[email protected]>; [email protected]; linux <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH v2 0/4] iio: adc: ade9000: add support for ADE9078[External]
Quoted 5 lines · On Fri, 31 Jul 2026 11:29:46 +0300 Antoniu Miclaus…
The ADE9078 is a polyphase energy metering device from the same family as the ADE9000 and is register compatible with it. The main differences relevant to the driver are the absence of the on-chip dip/swell detection, a lower maximum SPI clock (10 MHz), and slightly different full-scale ADC codes.
This looks fine to me, but will need to sit on list until the dt maintainers have gotten to it. Sashiko did call out some possible preexisting issues in the driver. I haven't looked at them, but if you have some time, it may be worth a look the power vs interrupt registration one smells plausible.
Quoted 6 lines
Quoted 1 line
Want me to send the fixes in a separate patch or within this series?
Separate should be fine for any preexisting issues. I'm not going to hold this series up waiting for them (assuming we get the dt ack - it's listed on their patchwork as Needs Ack so no one has gotten to it yet).
https://patchwork.kernel.org/project/devicetree/patch/[email protected]/
Applied this series to the testing branch of iio.git. Expecting to see patches dealing with any of the Sashiko found prexisting issues on top.
Thanks,
Jonathan
Quoted 42 lines
Jonathan
Quoted 37 lines
Quoted 36 lines
https://urldefense.com/v3/__https://sashiko.dev/*/patchset/20260731082
951.1228-1- antoniu.miclaus*40analog.com__;IyU!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_Pruv IpxZPJggP6_ge3-ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqRTn7EkeQ$Quoted 7 lines
This series adds support for the ADE9078 to the existing ade9000 driver. It first refactors the driver to move the part-specific values (device name, channel table, and full-scale codes) into a
chip_infostructure retrieved via device match data, then adds the new device tree compatible and the ADE9078 support itself, and finally updates the documentation.Quoted 6 lines
Changes in v2:
- move the "respective datasheets" comment wording to avoid churn.
- use a genericKconfigtitle and list the supported parts.
- duplicate the RMS voltage macro instead of a shared base macro.v1: https://urldefense.com/v3/__https://lore.kernel.org/linux-
iio/__;!!A3Ni8CS0y2Y!78esTjrnDgvdH9h_PruvIpxZPJggP6_ge3- ecPnYKxN8b32xrwH3oUABtFHCRmEGtnicycd5eqTALKwajg$ <FILL-IN-v1- MESSAGE-ID>/
Quoted 15 lines
Antoniu Miclaus (4):
iio: adc: ade9000: introducechip_infostructure
dt-bindings: iio: adc: adi,ade9000: add adi,ade9078 compatible
iio: adc: ade9000: add support for ADE9078
docs: iio: ade9000: document ADE9078 support.../bindings/iio/adc/adi,ade9000.yaml | 30 ++- Documentation/iio/ade9000.rst | 28 +-- drivers/iio/adc/Kconfig | 16 +- drivers/iio/adc/ade9000.c | 180 ++++++++++++------ 4 files changed, 175 insertions(+), 79 deletions(-)base-commit:
0b5e142ced4bcf20532da051934bd694d1bbd470