power: supply: qcom: use typec mode instead of debounce done

When the CC state change IRQ fires on USB removal the debounce done
status may still be high, and the removal cleanup will not be called.
Use the UFP/DFP status bits to determine whether the CC lines are
present or not instead.

While at it cache the CC state so it doesn't have to be derived
everywhere it is needed. The status bits are already cached, so there
should be no functional difference.

Change-Id: Ifb89c78a032ae9d38fbc8c281518698941e131c2
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
5 files changed