ap_pwrseq: reset sleep state after a full resume
ap_pwrseq: reset sleep state after a full resume

This sleep state should be reset only after a full resume.
Clearing it after suspend can create a state mismatch between ec and
AP when slp_s0 toggles and then goes back to sleep in certain cases.

The S0->S0S0ix transition in the power state machine looks up
the sleep state variable. If there is a transition from s0ix to S0 in EC
due to a SLP S0 signal toggle without a full system wake,
the transition back to s0ix will not happen since the sleep state variable
for host will not reflect a suspended state due to the reset. This patch
fixes this issue by resetting the state only after a full resume.

BUG=b:246231274
BRANCH=none
TEST=zmake build nivviks
     Tested using 'powerd_dbus_suspend' on AP and observed no issues in
     dozing stress test.

Change-Id: I147986966e9420a740cb1064d6122e28f71cd8b6
Signed-off-by: Subramony Sesha <d1a9f30762802c72f0f615cdffe1157dbe58a2b3@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4019704
Tested-by: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>
Reviewed-by: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>
Code-Coverage: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>
Tested-by: Deepti Deshatty <f990118e5e566f6bd80b8c40bac496dfafb1a88f@intel.corp-partner.google.com>
Commit-Queue: Andrew McRae <44ad1424cfc8411c96d9181798ca41ae55709dfb@google.com>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec