diff options
author | Wai-Hong Tam <waihong@google.com> | 2019-06-28 13:12:02 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-20 03:16:59 +0000 |
commit | a551572c396ba2e3c90f1e0581f256d6f207be2a (patch) | |
tree | 372229c3632f0814caa761dad5cfa7ccd28486a9 /board/servo_v4/usb_pd_config.h | |
parent | c3aa5d72a4a74245589c749d97cb1cca39e6380d (diff) | |
download | chrome-ec-a551572c396ba2e3c90f1e0581f256d6f207be2a.tar.gz |
servo_v4: Remove unnecessary init for GPIO MODULE_USB_PD
The pd_config_init() does two things:
* pd_tx_init() to init the GPIO MODULE_USB_PD;
* pd_set_host_mode() to set CC pull resistors.
The pd_config_init() is called on PD phy init hook.
For setting CC pull resistors, calling pd_set_host_mode() is enough.
Don't need to reinit GPIO MODULE_USB_PD.
BRANCH=servo
BUG=b:135691171
TEST=Set "cc" role to "src", "snk", "srcdts", "snkdts", and "off".
TEST=Unplugged and replugged the CHG port cable.
Change-Id: I1e783dfa5da4f8e8f1d9d591818eb1128b7a8caa
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1682917
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/servo_v4/usb_pd_config.h')
-rw-r--r-- | board/servo_v4/usb_pd_config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/servo_v4/usb_pd_config.h b/board/servo_v4/usb_pd_config.h index de2e3c70c8..e56dc5c791 100644 --- a/board/servo_v4/usb_pd_config.h +++ b/board/servo_v4/usb_pd_config.h @@ -265,8 +265,8 @@ static inline void pd_set_host_mode(int port, int enable) static inline void pd_config_init(int port, uint8_t power_role) { /* - * Set CC pull resistors, and charge_en and vbus_en GPIOs to match - * the initial role. + * Set CC pull resistors. The PD state machine will then transit and + * enable VBUS after it detects valid voltages on CC lines. */ pd_set_host_mode(port, power_role); |