From: <Ariana.Lazar@microchip.com>
To: <robh@kernel.org>, <krzk+dt@kernel.org>, <jic23@kernel.org>,
<nuno.sa@analog.com>, <dlechner@baylibre.com>,
<conor+dt@kernel.org>, <andy@kernel.org>
Cc: <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-iio@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: adc: add support for PAC1711
Date: Wed, 12 Aug 2026 13:34:46 +0000 [thread overview]
Message-ID: <0c0cc5addbb604187335cd534f68a9a7f8ce4ad4.camel@microchip.com> (raw)
In-Reply-To: <a869acd6-9c77-4495-a581-232ca88ac9e2@baylibre.com>
Hi David,
Thank you for the review. Please see my comments below.
> > +
> > + microchip,accumulation-mode:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + description: |
> > + The Hardware Accumulator may be used to accumulate VPOWER or
> > VSENSE values
> > + for any channel. By setting the accumulator for a channel to
> > accumulate
> > + the VPOWER values gives a measure of accumulated power over
> > a time period,
> > + which is equivalent to energy. Setting the accumulator for a
> > channel to
> > + accumulate VSENSE values gives a measure of accumulated
> > current, which is
> > + equivalent to charge.
> > +
> > + The Hardware Accumulator could be configured as:
> > + "vpower" - Accumulator accumulates VPOWER (energy)
> > + "vsense" - Accumulator accumulates VSENSE (Coulomb Counter)
> > + enum: [vpower, vsense]
> > + default: vpower
>
> Why does this one have to be a DT property? Can it not be switched
> at runtime to accumulate one or the other at different times?
This 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.
>
> Also datahseet says it can accumulate vbus measurements.
>
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - vdd-supply
> > + - shunt-resistor-micro-ohms
> > +
In the previous version of this patch series it was recommended to drop
VBUS accumulation option from the supported functionalities because it
has no practical usecase (other then maybe long term average) as
Jonathan suggested in the review for version 1:
https://lore.kernel.org/all/20251015-pac1711-v1-2-976949e36367@microchip.com/
I will readd it if it is needed.
Best regards,
Ariana
next prev parent reply other threads:[~2026-08-12 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 12:03 [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor Ariana Lazar
2026-07-28 12:03 ` [PATCH v2 1/2] dt-bindings: iio: adc: add support for PAC1711 Ariana Lazar
2026-08-01 17:30 ` David Lechner
2026-08-01 23:13 ` Jonathan Cameron
2026-08-12 13:34 ` Ariana.Lazar [this message]
2026-08-12 13:56 ` David Lechner
2026-07-28 12:03 ` [PATCH v2 2/2] " Ariana Lazar
2026-07-29 12:23 ` Uwe Kleine-König
2026-08-01 18:17 ` David Lechner
2026-08-01 23:38 ` Jonathan Cameron
2026-08-01 23:08 ` [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor Jonathan Cameron
2026-08-01 23:21 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c0cc5addbb604187335cd534f68a9a7f8ce4ad4.camel@microchip.com \
--to=ariana.lazar@microchip.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®