From a8eb0e2e9cc2ce105cfd9ba7eba0f11c0b21529a Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Wed, 27 Apr 2022 13:00:03 -0500 Subject: rbox: use PWRB_IN to check power button state Use the power button input to determine if the power button is pressed. CHECK_OUTPUT_PWRB_OUT follows CHECK_INPUT_PWRB_IN, so they should be the same. This switches to using the RBOX input since that is what cr50 should be using. BUG=b:175320127 TEST=press the power button. Verify powerbtn output looks good. Change-Id: Ie7f224489505366029450c98e341f3790192d49a Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3611615 Reviewed-by: Vadim Bendebury Commit-Queue: Vadim Bendebury --- chip/g/rbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/g/rbox.c b/chip/g/rbox.c index 6aaa0206eb..41ce6bcbb5 100644 --- a/chip/g/rbox.c +++ b/chip/g/rbox.c @@ -30,7 +30,7 @@ void rbox_clear_wakeup(void) int rbox_powerbtn_is_pressed(void) { - return !GREAD_FIELD(RBOX, CHECK_OUTPUT, PWRB_OUT); + return !GREAD_FIELD(RBOX, CHECK_INPUT, PWRB_IN); } /* -- cgit v1.2.1