lkml.org 
[lkml]   [2023]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2023-10-25 14:49    [W:0.689 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site