[PATCH v3 2/2] iio: adc: add Axiado SARADC driver

Jonathan Cameron jic23 at kernel.org
Thu Jul 2 12:54:12 PDT 2026


On Tue, 23 Jun 2026 10:30:37 +0200
Petar Stepanovic <pstepanovic at axiado.com> wrote:

> On 6/22/2026 11:55 AM, Joshua Crofts wrote:
> > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> >
> >
> > On Mon, 22 Jun 2026 00:47:28 -0700
> > Petar Stepanovic <pstepanovic at axiado.com> wrote:
> >  
> >> Add support for the SARADC controller found on Axiado AX3000 and
> >> AX3005 SoCs.
> >>
> >> The driver supports single-shot voltage reads through the IIO
> >> subsystem. The number of available input channels is selected from
> >> the SoC match data, allowing AX3000 and AX3005 variants to use the
> >> same driver.
> >>
> >> Signed-off-by: Petar Stepanovic <pstepanovic at axiado.com>
> >> ---
> >> +     info->clk_rate = clk_get_rate(info->clk);
> >> +     if (!info->clk_rate)
> >> +             return dev_err_probe(dev, -EINVAL, "invalid clock rate\n");
> >> +
> >> +     ret = devm_regulator_get_enable_read_voltage(dev, "vref");
> >> +     if (ret < 0)
> >> +             return dev_err_probe(dev, info->vref_uV,
> >> +                                  "failed to get vref voltage\n");  
> > Sashiko raised an issue that I've missed on previous reads - why
> > are you using info->vref_uV in dev_err_probe()? The info struct
> > is not zeroed out on initialization, which means that dev_err_probe
> > will return a different value each time when read_voltage() fails.
> > It was designed to accept the retval from whatever function we're
> > checking.  
> 
> Thank you for catching this.
> You are right, |dev_err_probe()| should use the return value from |devm_regulator_get_enable_read_voltage()|, not |info->vref_uV|.
> I will fix this in the next version by passing |ret| to |dev_err_probe()| and assigning |info->vref_uV| only after the call succeeds.
> 
Hi Petar,  Quick process thing.  If you fully agree with some
feedback, don't send an email to say that. The place for thanks
etc is the change log of the next version.

We are all swamped in email and it takes a non trivial amount
of time to check every reply for discussion that needs to continue.

This is probably the most common thing people who are new to the kernel
do that I'd rather they didn't :)  I send this email once or twice
a week at the moment.

Thanks,

Jonathan

> Regards,
> Petar
> 
> 




More information about the linux-arm-kernel mailing list