Messages in this thread | | | Date | Wed, 25 Oct 2023 13:47:38 +0100 | From | Mark Brown <> | Subject | Re: [PATCH v3 2/7] regulator: Handle system-critical under-voltage events |
| |
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. [unhandled content-type:application/pgp-signature] | |