Re: [PATCH v3 05/14] iio: adc: Add AD7768 and AD7768-4 core support

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-doc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-gpio,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
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 <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.