Re: [PATCH v2 2/2] regulator: fixed: add support for under-voltage IRQ

From: Mark Brown
Date: Tue Oct 24 2023 - 12:01:44 EST


On Tue, Oct 24, 2023 at 04:06:34PM +0200, Oleksij Rempel wrote:
> On Tue, Oct 24, 2023 at 02:26:24PM +0100, Mark Brown wrote:

> > We need a bit more policy here - the regulator could be critical to
> > system function but it could also be well isolated and just affecting
> > whatever device it's directly supplying in a way that the system can
> > tolerate and might even want to (eg, for something like a SD card or USB
> > port where end users are plugging in external hardware).

> Hm, how about devicetree property to indicate system critical nature of
> the regulator. For example "system-critical-regulator" or
> "system-critical-undervoltage-interrupt" ?

I'd probably go with the former. As a code thing we probably want the
driver to generate an under voltage notification and then the core uses
that notification to trigger the power failure handling. It feels like
we might end up doing something better in future but I'm not seeing it
right now and there's a fairly clear argument that this is a part of the
hardware design. It shouldn't be too bad to do backwards compatibility
if required I think.

I'd put the property in the core regulator bindings then it'll work for
everything.

Attachment: signature.asc
Description: PGP signature