Re: [PATCH v3 05/14] iio: adc: Add AD7768 and AD7768-4 core support
From: Andy Shevchenko
Date: Mon Aug 24 2026 - 11:28:21 EST
On Mon, Aug 24, 2026 at 04:45:01PM +0200, Philipp Zabel wrote:
> On So, 2026-08-16 at 20:10 +0100, Jonathan Cameron wrote:
> > On Thu, 13 Aug 2026 15:56:58 +0200
> > Janani Sunil <janani.sunil@xxxxxxxxxx> wrote:
[...]
> > > +static int ad7768_reset(struct ad7768_state *st)
> > > +{
> > > + struct reset_control *reset_ctrl;
> > > + unsigned long reset_low_us;
> > > + unsigned long mclk;
> > > + int ret;
> > > +
> > > + reset_ctrl = devm_reset_control_get_optional_exclusive(regmap_get_device(st->regmap),
> >
> > Probably use a local variable for struct device *dev = regmap_get_device(st->regmap);
> > to reduce line length.
>
> Or just pass dev into ad7768_reset() as an additional parameter.
It might make code be less understandable as this function is not something
like devm_*(). I slightly prefer my suggestion over this one.
--
With Best Regards,
Andy Shevchenko