Re: [PATCH v3 2/7] regulator: Handle system-critical under-voltage events
From: Mark Brown
Date: Wed Oct 25 2023 - 08:47:47 EST
On Wed, Oct 25, 2023 at 10:46:09AM +0200, Oleksij Rempel wrote:
> + if (rdev->constraints->system_critical &&
> + event == REGULATOR_EVENT_UNDER_VOLTAGE)
> + hw_protection_shutdown("System critical voltage drop detected",
> + REGULATOR_DEF_EMERG_SHUTDWN_TMO);
> +
This should probably be a switch statement for the event and also handle
REGULATOR_EVENT_FAIL, possibly other errors this would also be
appropriate handling but it's less immediately obvious and we can
always extend later.
Attachment:
signature.asc
Description: PGP signature