Messages in this thread | | | Date | Tue, 30 Apr 2024 08:48:23 +0200 | From | Oleksij Rempel <> | Subject | Re: PoE complex usage of regulator API |
| |
On Tue, Apr 30, 2024 at 11:23:15AM +0900, Mark Brown wrote: > On Mon, Apr 29, 2024 at 07:28:48PM +0200, Kory Maincent wrote: > > Mark Brown <broonie@kernel.org> wrote: > > > On Fri, Apr 26, 2024 at 12:42:53PM +0200, Kory Maincent wrote: > > > That's right I was focusing on power where I could use already implemented > > voltage and current callbacks. Would you be interested to a new get_current() > > callback to know the current and allows regulator to deduce the consumed power > > or should it be specific to PSE subsystem. > > That feels like it belongs in hwmon or possibly power rather than in the > regulator API but it does feel like it's generally useful rather than > PSE specific.
I would say, it depends on use case and abilities of HW. Power consumption may change rapidly, so it is all about sampling rate. For real time current measurement you wont to use iio framework. For most cases and simple diagnostic are more interesting max and probably min values which self cleared after last read.
If HW provides only real time measurement, then the question is, how many samples are needed to provide some usable result.
Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
| |