Re: [PATCH v3 0/2] adding support for Microchip PAC193X Power Monitor

From: Guenter Roeck
Date: Wed Nov 15 2023 - 14:38:46 EST


On Wed, Nov 15, 2023 at 03:44:51PM +0200, marius.cristea@xxxxxxxxxxxxx wrote:
> From: Marius Cristea <marius.cristea@xxxxxxxxxxxxx>
>
> Adding support for Microchip PAC193X series of Power Monitor with
> Accumulator chip family. This driver covers the following part numbers:
> - PAC1931, PAC1932, PAC1933 and PAC1934
>
> This device is at the boundary between IIO and HWMON (if you are
> looking just at the "shunt resistors, vsense, power, energy"). The
> device also has ADC internally that can measure voltages (up to 4
> channels) and also currents (up to 4 channels). The current is measured as
> voltage across the shunt_resistor.
>
> I have started with a simple driver (this one that is more appropriate to be a
> HWMON) and willing to add more functionality later (like data buffering that is quite
> important for example if someone wants to profile power consumption of the
> processor itself, or a peripheral device, or a battery, this kind of functionality
> was requested by our customers).
>

I sdon't immediately see any typical hwmon properties such as limit registers
or alarms. The hwmon subsystem also doesn't support data buffering.
Given that, the iio implementation seems more appropriate to me.
Anyone using the chip for hardware monitoring can use the iio->hwmon bridge.

Thanks,
Guenter