ppc: syv682x: Make source disable dependent on VBUS presence
ppc: syv682x: Make source disable dependent on VBUS presence

The syv682x PPC does not provide independent disabling of the source
and sink paths. Instead there is a single bit PWR_ENB, which when set,
will disable both the source and sink paths.

As part of USB PD initialization, pd_power_supply_reset(0) is called
to ensure VBUS isn't being sourced. If the source path isn't currently
active, then PWR_ENB bit should not be set as that will also disable
the sink path which may be active in a dead battery start up case.

This CL modifies the syv682x driver to only set PWR_ENB if the bit in
flags is set to indicate that the VBUS was being sourced.

BRANCH=none
BUG=b:117657778
TEST=Tested on DragonEgg. With no battery, connected external to port
1 and verified that the system boots successfully. Previously, it
would lose power.

Change-Id: I92b8f86a4b5b4e103dbeeafda2cf8da9ac7c17f2
Signed-off-by: Scott Collyer <7d40b3eb9e17bf55d972074a5e77a7ea4159f9dd@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1285294
Commit-Ready: ChromeOS CL Exonerator Bot <fa429e5907f00867f797423aea74327bb02c91b6@appspot.gserviceaccount.com>
Tested-by: Scott Collyer <7d40b3eb9e17bf55d972074a5e77a7ea4159f9dd@chromium.org>
Reviewed-by: Furquan Shaikh <6be5c96c464778f89679b1062a2e0a6af93d2aa5@chromium.org>
Reviewed-by: Jett Rink <9d4aef0593e6843318d99df31597fb6153b89787@chromium.org>

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