[PATCH v4 6/9] power: reset: macsmc-reboot: Add driver for rebooting via Apple SMC
Alyssa Rosenzweig
alyssa at rosenzweig.io
Fri May 9 09:21:42 PDT 2025
> >
> >> + mdelay(100);
> >> + WARN_ON(1);
> >
> > ...What?
>
> This is done in a few drivers in drivers/power/reboot. If we haven't
> rebooted after 100ms something's wrong with SMC. I'll add a comment.
>
> drivers/power/reset/tps65086-restart.c: WARN_ON(1);
> drivers/power/reset/atc260x-poweroff.c: WARN_ONCE(1, "Unable to power off system\n");
> drivers/power/reset/mt6323-poweroff.c: WARN_ONCE(1, "Unable to power off system\n");
> drivers/power/reset/gpio-restart.c: WARN_ON(1);
> drivers/power/reset/regulator-poweroff.c: WARN_ON(1);
Ohh, duh, ok. Cute.
Can we do the WARN_ONCE(1, "Unable ...") pattern? Then we don't need a
comment since the warn message makes it obvious.
More information about the linux-arm-kernel
mailing list