summaryrefslogtreecommitdiff
path: root/driver/tcpm/tcpci.c
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-08-15 15:23:21 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-16 20:46:36 -0700
commitee3fb6c6aa1b1ba3a7d92e1fdd8a32a5924246d6 (patch)
tree40686bba3abaae99d1581ffd8c406bf37862259f /driver/tcpm/tcpci.c
parent63158e2ee67a906d0868fad4c65d04207b4e0427 (diff)
downloadchrome-ec-ee3fb6c6aa1b1ba3a7d92e1fdd8a32a5924246d6.tar.gz
ps8xxx: use custom tcpm_drv
the ps8xxx family of TCPCs (ps8751, ps8805) have historically used the generic tcpci_tcpm_drv functions, but we need to override some of these entry points because the parade parts need to be woken up before accessing registers. in most cases, this doesn't matter because we access the chip in quick succession where we can "safely" assume the chip is awake -- and the code is structured to implicitly keep the chip awake. the new case we need to address here is where we need to suspend the pd_task and TCPC at an arbitrary point in time. the driver's .release method is called to shut down the chip, and that involves first waking up the chip to be able to access its regs to mask off interrupts, etc. BUG=b:35586896 BRANCH=none TEST=tested from depthcharge - we no longer get errors in the EC console logs about TCPC "release" failed. Change-Id: Ic2a90b71050b3f68c697b1cef48d736ed88b3f41 Signed-off-by: Caveh Jalali <caveh@google.com> Reviewed-on: https://chromium-review.googlesource.com/616460 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpci.c')
-rw-r--r--driver/tcpm/tcpci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c
index a8abfc5689..11c7283124 100644
--- a/driver/tcpm/tcpci.c
+++ b/driver/tcpm/tcpci.c
@@ -108,7 +108,7 @@ int tcpci_tcpm_select_rp_value(int port, int rp)
}
#ifdef CONFIG_USB_PD_DISCHARGE_TCPC
-static void tcpci_tcpc_discharge_vbus(int port, int enable)
+void tcpci_tcpc_discharge_vbus(int port, int enable)
{
int reg;
@@ -137,7 +137,7 @@ int tcpci_tcpm_set_cc(int port, int pull)
}
#ifdef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE
-static int tcpci_tcpc_drp_toggle(int port, int enable)
+int tcpci_tcpc_drp_toggle(int port, int enable)
{
int rv;