Re: [PATCH 1/4] iio: adc: ade9000: parameterise the reactive power channel

From: Joshua Crofts

Date: Mon Oct 12 2026 - 10:05:11 EST


On Mon, 12 Oct 2026 14:13:37 +0300
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx> wrote:

> The channel array is declared once by ADE9000_DECLARE_CHANNELS() and
> specialised per part through the altvoltage_rms argument, which lets parts
> without dip/swell hardware drop those events. Some parts in the family do
> not compute total reactive power at all and have no AVAR register, so they
> need to drop the reactive power channel as well.
>
> Add a second argument that selects the reactive power entry and introduce
> the ADE9000_POWER_REACTIVE_ENTRY()/ADE9000_NO_POWER_REACTIVE_ENTRY() pair
> for it. The entry macros include their own trailing comma so that the
> variant for parts lacking the register can expand to nothing.
>
> No functional change: the preprocessed ade9000_channels and
> ade9078_channels tables are unchanged.
>
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> ---

Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>

--
Kind regards,
Joshua Crofts