Re: [PATCH v4 3/3] iio: adc: add driver for the MAX34417 Four-Channel High Dynamic Range Power Accumulator
From: Andy Shevchenko
Date: Thu Oct 29 2026 - 08:59:31 EST
On Wed, Oct 28, 2026 at 04:26:01PM +0100, Neil Armstrong wrote:
> On 10/28/26 16:06, Andy Shevchenko wrote:
> > On Wed, Oct 28, 2026 at 02:19:06PM +0100, Neil Armstrong wrote:
...
> > > +static bool max34417_volatile_reg(struct device *dev, unsigned int reg)
> > > +{
> > > + switch (reg) {
> > > + case MAX34417_DID_REG:
> > > + return false;
> > > + default:
> > > + /* MAX34417_CONTROL_REG field OVF is volatile */
> >
> > Why not add a case instead of a comment?
>
> The case is handled by the default, the comment is here to
> explain why MAX34417_CONTROL_REG is considered as volatile.
Still, having an explicit case is better, just add a comment about the field.
> > > + return true;
> > > + }
> > > +}
--
With Best Regards,
Andy Shevchenko