Re: [PATCH v3 1/2] dt-bindings: iio: adc: add support for PAC1711
From: Conor Dooley
Date: Sat Sep 12 2026 - 06:20:05 EST
On Thu, Sep 10, 2026 at 02:52:02PM +0000, Ariana.Lazar@xxxxxxxxxxxxx wrote:
> Hi Conor,
>
> > > + The accumulation-source property aims to specify what kind of
> > > hardware is
> > > + intended to be used/available for the user. There are two main
> > > cases here:
> > > + - the user wants to measure also the current/power consumed
> > > before the
> > > + driver insertion (e.g. from the boot to user control) and if
> > > this is a
> > > + runtime setting, the hardware accumulator will be reset by
> > > the default
> > > + configuration the driver starts with.
> > > + - the driver does not know what type of hardware it's dealing
> > > with. In
> > > + case the part is monitoring the charge/discharge current it
> > > does not
> > > + make sense in user-space to change the accumulator to
> > > calculate energy.
> > > + Same if the hardware is intended to calculate energy it does
> > > not make
> > > + sense in user-space to change to Coulomb counter. Changing
> > > the setting
> > > + from one mode to another will reset the hardware accumulator
> > > inside the
> > > + chip.
> >
> > Why is this here, rather than with the property in question or the
> > commit message? Anything justifying the property should just be in
> > the
> > commit message, this doc is user facing and just should explain when
> > and
> > why to use it.
> > >
>
> Thanks for the review. I put the explanation in the binding description
> as suggested in the V2 review here:
> https://lore.kernel.org/all/a73ab4e3-520e-4515-adaf-ed5ec644e5f6@xxxxxxxxxxxx/
>
> But if it's better, I will move it in the commit message instead in V4
> of this patch series.
Things explaining the use of the property and hinting to a user when
they might want to set it (which this does contain) should be reworded
to not talk about concepts like "userspace" and can be retained - but in
the property description not the binding's main one. Things justifying
your design that don't help the author of a dts should go in the commit
message.
Attachment:
signature.asc
Description: PGP signature