Fix edge detection of ALL_SYS_PWROK

This commit is contained in:
Jeremy Soller 2019-11-22 14:59:46 -07:00
parent 445a01de42
commit 5402fa33df
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1

View File

@ -196,10 +196,10 @@ void power_event(void) {
DEBUG("Power switch release\n");
}
#endif
last = new;
// Send power signal to PCH
gpio_set(&PWR_BTN_N, new);
last = new;
}
// Always switch to ds5 if EC is running
@ -241,6 +241,7 @@ void power_event(void) {
// De-assert PCH_PWROK
gpio_set(&PM_PWROK, false);
}
pg_last = pg_new;
static bool rst_last = false;
bool rst_new = gpio_get(&BUF_PLT_RST_N);
@ -249,6 +250,7 @@ void power_event(void) {
pnp_enable();
//TODO: reset KBC and touchpad states
}
rst_last = rst_new;
// EC must keep VccPRIM powered if SUSPWRDNACK is de-asserted low or system
// state is S3