Re: [PATCH 1/2] regulator: Add support for power budget

From: Mark Brown
Date: Tue Jan 14 2025 - 09:15:30 EST


On Tue, Jan 14, 2025 at 02:53:28PM +0100, Kory Maincent wrote:
> Mark Brown <broonie@xxxxxxxxxx> wrote:

> > Yup, indeed. That said I am wondering if it's safer to just configure
> > the constraint in the hardware rather than the currently requested
> > limit, considering what might happen in the case where there's multiple
> > consumers that have only been partially updated. If the hardware limits
> > or shuts down rather than warning it'll blow up badly so it might be
> > better to be conservative. Unfortunately we don't distinguish in the
> > ops. Possibly it should be a policy thing even but then that's better
> > at runtime...

> Indeed, should we begin without it and see later if we add it?

I think so.

> We could simply add an event for now:
> regulator_notifier_call_chain(rdev, REGULATOR_EVENT_OVER_CURRENT, NULL);

We should (TBH I thought that was there already) but part of the problem
is that a bunch of the hardware will shut down or otherwise do something
that we might not want when it hits the limit. Again something that
could be addressed separately/incrementally.

Attachment: signature.asc
Description: PGP signature