RE: [PATCH v11 8/8] iio: adc: ad4851: add ad485x driver

From: Miclaus, Antoniu
Date: Thu Feb 06 2025 - 05:01:53 EST


> On 1/27/25 4:57 AM, Antoniu Miclaus wrote:
> > Add support for the AD485X a fully buffered, 8-channel simultaneous
> > sampling, 16/20-bit, 1 MSPS data acquisition system (DAS) with
> > differential, wide common-mode range inputs.
> >
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>
> > ---
>
> I think we have the important bits sorted now (i.e. userspace-facing stuff).
> Just noticed a few minor things in the latest revision.
>
>
> > +static int ad4851_setup(struct ad4851_state *st)
> > +{
> > + unsigned int product_id;
> > + int ret;
> > +
> > + if (st->pd_gpio) {
> > + /* To initiate a global reset, bring the PD pin high twice */
> > + gpiod_set_value(st->pd_gpio, 1);
> > + fsleep(1);
> > + gpiod_set_value(st->pd_gpio, 0);
> > + fsleep(1);
> > + gpiod_set_value(st->pd_gpio, 1);
> > + fsleep(1);
> > + gpiod_set_value(st->pd_gpio, 0);
> > + fsleep(1000);
> > + } else {
> > + ret = regmap_set_bits(st->regmap,
> AD4851_REG_INTERFACE_CONFIG_A,
> > + AD4851_SW_RESET);
> > + if (ret)
> > + return ret;
>
> Do we also need fsleep() after software reset?
The datasheet doesn't mention any delay required after performing Software Reset.
Should I add something just as a safety measure?