rk8xx_poweroff: enable power-cycling on support hardware

Previously, the function would return early if RB_POWERCYCLE was
specified without RB_POWEROFF.  Those flags are exclusive at the moment,
that is, they are never set together.

Søren Schmidt (sos) uses a similar but extended patch locally.

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2024-02-18 15:57:34 +02:00
parent b98558e69b
commit 8b408fc6f2

View file

@ -108,7 +108,7 @@ rk8xx_poweroff(void *arg, int howto)
int error;
uint8_t val;
if ((howto & RB_POWEROFF) == 0)
if (howto & (RB_POWEROFF | RB_POWERCYCLE) == 0)
return;
device_printf(sc->dev, "Powering off...\n");