mb/google/bluey: Refactor is_pd_sync_required function
BUG=none TEST=Verify boot on Google/Quenbi. Change-Id: Ic2f779d963105ef24b9cae3747ac7cc78ec9ae8b Signed-off-by: Kapil Porwal <kapilporwal@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90596 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3f00ecb05c
commit
75333ea7c8
1 changed files with 4 additions and 4 deletions
|
|
@ -55,11 +55,11 @@ static bool is_pd_sync_required(void)
|
|||
EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN));
|
||||
uint64_t ec_events = google_chromeec_get_events_b();
|
||||
|
||||
if (!(ec_events & manual_pwron_event_mask) &&
|
||||
(ec_events & EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED)))
|
||||
return true;
|
||||
if (!(ec_events & EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED)))
|
||||
return false;
|
||||
|
||||
if (google_chromeec_is_below_critical_threshold() || !google_chromeec_is_battery_present())
|
||||
if (!(ec_events & manual_pwron_event_mask) ||
|
||||
google_chromeec_is_below_critical_threshold() || !google_chromeec_is_battery_present())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue