From: Mark Brown <broonie@kernel.org>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org,
Naresh Solanki <naresh.solanki@9elements.com>,
zev@bewilderbeest.net, Sebastian Reichel <sre@kernel.org>,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 3/3] regulator: fixed: forward under-voltage events
Date: Wed, 11 Oct 2023 12:38:19 +0100 [thread overview]
Message-ID: <2d14fd22-c37b-4c15-a2ea-a2fd2c201adb@sirena.org.uk> (raw)
In-Reply-To: <20231011075931.GA3305420@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-10-11 11:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231010085906.3440452-1-o.rempel@pengutronix.de>
[not found] ` <20231010085906.3440452-3-o.rempel@pengutronix.de>
[not found] ` <5e51792a-cc93-4364-a51b-c2b116d89369@sirena.org.uk>
[not found] ` <20231010125531.GA3268051@pengutronix.de>
2023-10-10 17:19 ` [PATCH v1 3/3] regulator: fixed: forward under-voltage events Mark Brown
2023-10-11 7:59 ` Oleksij Rempel
2023-10-11 11:38 ` Mark Brown [this message]
2023-10-12 7:08 ` Matti Vaittinen
2023-10-12 11:13 ` Mark Brown
2023-10-21 0:26 ` Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d14fd22-c37b-4c15-a2ea-a2fd2c201adb@sirena.org.uk \
--to=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=naresh.solanki@9elements.com \
--cc=o.rempel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=zev@bewilderbeest.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox