Re: [PATCH v3 4/7] iio: adc: ad7625: use standard unit names

From: Nicolae-Daniel Deaconescu

Date: Mon Nov 09 2026 - 09:17:56 EST


Hi Jonathan,

On Sat, 7 Nov 2026 01:55:31 +0000, Jonathan Cameron wrote:
>
> > Use standard unit spelling and macros in existing code:
> > - Rename vref_mv to vref_mV and ref_mv to ref_mV, spelling the voltage unit
> > as mV.
>
> What about poor Heinrich Hertz? If we are doing this let's acknowledge
> his contribution as well and use _Hz as the postfix for those.
>
> Also Volta isn't doing well in some of this.
>
> I'm generally in favour of this stuff but it is churn heavy to
> tidy up in existing code. So my preference is keep these improvements
> for places where you are modifying the naming anyway or making lots
> of new use of an existing variable.

Fair. I'll drop this patch in v4 and leave the existing names alone. Hertz
keeps clk_rate_Hz in the new PWM struct.

>
> > @@ -517,7 +517,7 @@ static int devm_ad7625_regulator_setup(struct device *dev,
> > struct ad7625_state *st)
> > {
> >
> > - if (ref_mv == 5000 && !st->can_ref_5v)
> > + if (ref_mV == 5000 && !st->can_ref_5v)
>
> Why is it 5v rather than 5V?

can_ref_5v (and can_ref_4v096) are from the original driver.

Thanks,
Daniel