[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d14fd22-c37b-4c15-a2ea-a2fd2c201adb@sirena.org.uk>
Date: Wed, 11 Oct 2023 12:38:19 +0100
From: Mark Brown <broonie@...nel.org>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Naresh Solanki <naresh.solanki@...ements.com>,
zev@...ilderbeest.net, Sebastian Reichel <sre@...nel.org>,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v1 3/3] regulator: fixed: forward under-voltage events
On Wed, Oct 11, 2023 at 09:59:31AM +0200, Oleksij Rempel wrote:
> Configuration through the device tree and kernel defaults is preferable.
> For instance, having a default kernel governor that doesn’t require user
> space configuration aligns with the project’s objectives.
That's policy though...
>
> > For the regulator itself we probably want a way to identify regulators
> > as being system critical so they start notifying. It would be tempting
> > to just do that by default but that would likely cause some issues for
> > example with regulators for things like SD cards which are more likely
> > to get hardware problems that don't comprimise the entire system. We
> > could do that with DT, either a property or some sort of runtime
> > consumer, but it might be better to have a control in sysfs that
> > userspace can turn on? OTOH the ability do something about this depends
> > on specific hardware design...
> >
> > I've copied in Sebastian since this sounds like the sort of thing that
> > power supplies might have some kind of handling for, or at least if we
> > need to add something we should make it so that the power supplies can
> > be joined up to it. I do see temperature and capacity alerts in the
> > sysfs ABI for power supplies, but nothing for voltage.
>
> Thank you for pointing towards the power supply framework. Given the hardware
> design of my project, I can envision mapping the following states and
> properties within this framework:
There's also hw_failure_emergency_poweroff() which looks like exactly
what you're trying to trigger here.
> Considering the above mapping, my initial step would be to create a simple
> regulator coupled (if regulator is still needed in this casr) with a Device
> Tree (DT) based power supply driver. This setup would align with the existing
> power supply framework, with a notable extension being the system-wide
> notification for emergency shutdown upon under-voltage detection.
It sounds like this is actually a regulator regardless of if it also
appears via some other API.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists