summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpm.h
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2020-07-01 16:36:48 +1000
committerCommit Bot <commit-bot@chromium.org>2020-07-06 03:40:27 +0000
commit3f01ed23cae2dd07bc8d9ec69f5a15aa9afaefa3 (patch)
tree755252b65e1941fc3b335dc83faa1cacb9bb0c07 /driver/tcpm/tcpm.h
parent443d8cbb9e682302f665aef737bd746f19e5dcc1 (diff)
downloadchrome-ec-3f01ed23cae2dd07bc8d9ec69f5a15aa9afaefa3.tar.gz
usbc: only try to use ppc_set_frs_enable if it exists
The driver function to set FRS enable only exists if CONFIG_USB_PD_FRS_PPC is enabled, so we must also make its callers conditional in the same way. For consistency, also revise the TCPC FRS code paths to be conditional. BUG=b:146393213 BRANCH=None TEST=make buildall Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I3fb14c711dd2abdf6ef77d469b2103f37daac182 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276125 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r--driver/tcpm/tcpm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h
index 9bb8362158..0c2f0417e9 100644
--- a/driver/tcpm/tcpm.h
+++ b/driver/tcpm/tcpm.h
@@ -461,6 +461,7 @@ int tcpm_has_pending_message(int port);
*/
void tcpm_clear_pending_messages(int port);
+#ifdef CONFIG_USB_PD_FRS_TCPC
/**
* Enable/Disable TCPC Fast Role Swap detection
*
@@ -482,6 +483,7 @@ static inline int tcpm_set_frs_enable(int port, int enable)
rv = tcpc->set_frs_enable(port, enable);
return rv;
}
+#endif /* defined(CONFIG_USB_PD_FRS_TCPC) */
#ifdef CONFIG_CMD_TCPC_DUMP
static inline void tcpm_dump_registers(int port)