[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <471281bf-4126-496b-93ef-0807f4910ce7@sirena.org.uk>
Date: Tue, 24 Oct 2023 14:26:24 +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
Subject: Re: [PATCH v2 2/2] regulator: fixed: add support for under-voltage
IRQ
On Tue, Oct 24, 2023 at 03:08:42PM +0200, Oleksij Rempel wrote:
> Add interrupt support for under-voltage notification. This functionality
> can be used on systems capable to detect under-voltage state and having
> enough capacity to let the SoC do some emergency preparation.
>
> This change enforce default policy to shutdown system as soon as
> interrupt is triggered.
...
> +static irqreturn_t reg_fixed_under_voltage_irq_handler(int irq, void *data)
> +{
> + hw_protection_shutdown("Critical voltage drop reached",
> + FV_DEF_EMERG_SHUTDWN_TMO);
> +
> + return IRQ_HANDLED;
> +}
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).
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists