From 857f39d7b09804566b23e0f20fcb04601f2ecb52 Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Thu, 16 May 2019 21:48:41 +0000 Subject: sysreset: switch to using SYSRESET_POWER_OFF for poweroff It seems that SYSRESET_POWER_OFF was added recently, and all previous code used SYSRESET_POWER for poweroff. SYSRESET_POWER is supposed to be a PMIC-level power cycle, not a poweroff. (Comment by Simon Glass) SYSRESET_POWER means to do a power reset (removing and reinstating all power) SYSRESET_POWER_OFF means to turn the device off and leave it off Signed-off-by: Urja Rannikko Reviewed-by: Patrick Delaunay (Update comment to help understand the patch) Signed-off-by: Kever Yang --- drivers/sysreset/sysreset_sandbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/sysreset/sysreset_sandbox.c') diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c index 7dfd89460f0..69c22a70008 100644 --- a/drivers/sysreset/sysreset_sandbox.c +++ b/drivers/sysreset/sysreset_sandbox.c @@ -57,13 +57,13 @@ static int sandbox_sysreset_request(struct udevice *dev, enum sysreset_t type) case SYSRESET_COLD: state->last_sysreset = type; break; - case SYSRESET_POWER: + case SYSRESET_POWER_OFF: state->last_sysreset = type; if (!state->sysreset_allowed[type]) return -EACCES; sandbox_exit(); break; - case SYSRESET_POWER_OFF: + case SYSRESET_POWER: if (!state->sysreset_allowed[type]) return -EACCES; sandbox_exit(); -- cgit v1.2.3