git: 8b408fc6f2f6 - main - rk8xx_poweroff: enable power-cycling on support hardware

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sun, 18 Feb 2024 14:08:58 UTC
The branch main has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b408fc6f2f6dab2bfc200edee96917abf425cb2

commit 8b408fc6f2f6dab2bfc200edee96917abf425cb2
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2024-02-18 13:57:34 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2024-02-18 14:04:29 +0000

    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
---
 sys/dev/iicbus/pmic/rockchip/rk8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/iicbus/pmic/rockchip/rk8xx.c b/sys/dev/iicbus/pmic/rockchip/rk8xx.c
index 9e29c62f95bd..6cbfd19ff443 100644
--- a/sys/dev/iicbus/pmic/rockchip/rk8xx.c
+++ b/sys/dev/iicbus/pmic/rockchip/rk8xx.c
@@ -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");