TCPMv2: Use helper functions in cable check
TCPMv2: Use helper functions in cable check

This is no-op refactor.

There are quite a few places to check if SOP'/SOP" are needed
when enter or exit TBT Alt mode. Group this checking in common
functions to reduce code duplication.
Also add helper function to check a special cable type which is
passive in ID VDO but active in TBT3 VDO (for example, LRD cable).

BUG=none
BRANCH=none
TEST=On Voxel, LRD cable can enter USB4 mode with Gatkex Creek;
can enter TBT mode with TBT dock.
Same tests with CBR, Apple TBT3 cable, Apple TBT4 cable, all pass.

Signed-off-by: Li Feng <0fd15d95d647a38d004d7ac9a3d0587bb1c98551@intel.com>
Change-Id: I7652bb6ab7e669104ae34414fbfc6f725e0a8ac3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3731282
Reviewed-by: Abe Levkoy <2e1ad7039298f93262cf06bbb457275fb3e2ecb5@chromium.org>

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