Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Ariana Lazar <ariana.lazar@microchip.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux@roeck-us.net
Subject: Re: [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor
Date: Sun, 2 Aug 2026 00:08:22 +0100	[thread overview]
Message-ID: <20260802000822.16d9e121@jic23-huawei> (raw)
In-Reply-To: <20260728-pac1711-v2-0-609bc026093c@microchip.com>

On Tue, 28 Jul 2026 15:03:47 +0300
Ariana Lazar <ariana.lazar@microchip.com> wrote:

> The PAC1711, PAC1721, PAC1811 and PAC1821 products are single-channel power
> monitors with accumulator. The PAC1711 and PAC1721 devices use 12-bit
> resolution for voltage and current measurements and 24 bits for power
> calculations, while PAC1811 and PAC1821 have 16-bit resolution and use 32
> bits for power calculations. The 56-bit accumulator register accumulates
> power (energy) or current (Coulomb counter).
> 
> PAC1711 and PAC1811 measure up to 42V Full-Scale Range, respectively 9V for
> PAC1721 and PAC1821.

Hi Ariana,

Cover letter should include a discussion of why IIO makes more sense than
hmwon similar to what you posted for v1. 

+ keep Guenter +CC if not also the hmwon list.

Jonathan


> 
> Signed-off-by: Ariana Lazar <ariana.lazar@microchip.com>
> ---
> Changes in v2:
> - fix review comments device tree binding:
>     add PAC1721, PAC1811 and PAC1821 part numbers
>     add Vbus/Vsense input ranges in attribute definition
>     change accumulation-mode from int to string type
>     remove size and address cells
>     correct interrupts definition and add attributes for the two
>       alerts, microchip,gpio0-mode and microchip,gpio1-mode
>     remove microchip,gpio attribute
>     remove "vbus" accumulation mode 
> 
> - fix review comments driver:
>     add PAC1721, PAC1811 and PAC1821 part numbers
>     run pahole on reg_data and pac1711_chip_info structs
>     remove average registers - VBUS_AVG and VSENSE_AVG
>     add PAC1721, PAC1811, PAC1821 to features/compatible
>     add missing headers
>     remove rarely used defines like PAC1711_POWER_24B_RES and use the
>       numerical value inline instead
>     use ARRAY_SIZE() instead of define for the number of accumulator
>       related attributes
>     add explanation for bytes length defines
>     use spacing convention space after { and before }
>     remove pac1711_shift_map_tbl in order to use just
>       pac1711_samp_rate_map_tbl and an index saved in struct
>     use read_avail() for sampling_rate
>     change mutex comment in reg_data
>     use fsleep instead of usleep
>     use a local __be16 variable in endianess transformations
>     add missing error returns after dev_err
>     add info_mask_shared_by_all for sampling_frequency 
>     use dev_info instead of dev_err_probe in chip_identify
>     generalize input setup functions into one
>     remove device_property_present
>     rename pac1711_single_channel into pac1711_chan_spec
>     rename pac1711_of_parse_channel_config into pac1711_parse_fw
>     remove unneccessary comments in probe
>     define in_shunt_resistor as ext_info instead of custom attribute
>     use calculations only with 16-bit resolution instead of multiple
>      shifting (12-bit registers are left shifted)
>     add scale computations based on new voltage of 9V for PAC1721/PAC1821
> 
> v1:
> - first version committed to review
> - Link to v1: https://lore.kernel.org/r/20251015-pac1711-v1-0-976949e36367@microchip.com
> 
> ---
> Ariana Lazar (2):
>       dt-bindings: iio: adc: add support for PAC1711
>       iio: adc: add support for PAC1711
> 
>  .../ABI/testing/sysfs-bus-iio-adc-pac1711          |   24 +
>  .../bindings/iio/adc/microchip,pac1711.yaml        |  209 ++++
>  MAINTAINERS                                        |    8 +
>  drivers/iio/adc/Kconfig                            |   11 +
>  drivers/iio/adc/Makefile                           |    1 +
>  drivers/iio/adc/pac1711.c                          | 1274 ++++++++++++++++++++
>  6 files changed, 1527 insertions(+)
> ---
> base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
> change-id: 20250901-pac1711-d3bacda400fd
> 
> Best regards,


  parent reply	other threads:[~2026-08-01 23:08 UTC|newest]

Thread overview: 10+ 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-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 ` Jonathan Cameron [this message]
2026-08-01 23:21 ` [PATCH v2 0/2] add support for Microchip PAC1711 Power Monitor 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=20260802000822.16d9e121@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=ariana.lazar@microchip.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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