diff options
author | Ayushee <ayushee.shah@intel.com> | 2019-10-31 11:32:51 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-01 01:48:42 +0000 |
commit | 946402100fd0589b5480eebd8444a7c3eb9b6aa5 (patch) | |
tree | b74cf990222b891144a66d8edad119b9d8f9682c /common/usb_pd_protocol.c | |
parent | 3ad88b367cf49da53865890bd7539827d1f29813 (diff) | |
download | chrome-ec-946402100fd0589b5480eebd8444a7c3eb9b6aa5.tar.gz |
Cleanup: Renaming pd_is_ufp to pd_partner_is_ufp
pd_is_ufp function returns port partner CC status, renaming it
to pd_partner_is_ufp to avoid ambiguity between host and port
partner's CC status.
BUG=b:141971044
BRANCH=None
TEST=make buildall -j
Change-Id: I19da8c8470db134e438271b92918994d77e4eb5d
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1894119
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r-- | common/usb_pd_protocol.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 03a2f84c95..a08027ad5e 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -394,9 +394,12 @@ int pd_is_vbus_present(int port) } #ifdef CONFIG_USB_PD_RETIMER -int pd_is_ufp(int port) +/** + * This function checks the current CC status of the port partner + * and returns true if the attached partner is UFP. + */ +int pd_partner_is_ufp(int port) { - /* Returns true if port partner is UFP */ return pd[port].cc_state == PD_CC_UFP_ATTACHED || pd[port].cc_state == PD_CC_UFP_DEBUG_ACC || pd[port].cc_state == PD_CC_UFP_AUDIO_ACC; |