pchg: Notify host of only device detection in suspend
pchg: Notify host of only device detection in suspend

Currently, pchg sends a host event for any event including charging
update. This will prevent the host from staying in S3 while charging
a peripheral device.

This patch makes pchg notify the host only a device attach or detach
event when the system is in S3/S0ix.

Tested resume on detach as follows:
1. Verify system can suspend with a stylus attached.
2. Detach a stylus.
3. Verify system resumes.

Tested resume on attach as follows:
1. Suspend with a stylus detached.
2. Attach a stylus.
3. Verify system resumes.

BUG=b:177664326,b:173235954
BRANCH=trogdor
TEST=CoachZ. See above.

Signed-off-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
Change-Id: Icf7c6c46f94f27f1f24eb2ac9634d317bc14f4d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2665407
Reviewed-by: Vincent Palatin <70a9964ec8fd10b0b08fcc8623c2add25ddf99ac@chromium.org>

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