summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-12-13 15:59:11 +0800
committerCommit Bot <commit-bot@chromium.org>2021-12-28 09:34:32 +0000
commit2d798b863260afa15e6404ded5f11129e79edbad (patch)
treecfb282e2855972843583166b743f4769784c4dca
parentb87d0ad6fa03b1aad4d8a663264cf19176e34c08 (diff)
downloadchrome-ec-2d798b863260afa15e6404ded5f11129e79edbad.tar.gz
rt1718s: expose software reset function
The function is needed for PD MCU reset. BUG=b:203739613 TEST=ensure the function is called. BRANCH=none Change-Id: I733b9858ae6ce65877ee51324130a1690cf63938 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3330388 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
-rw-r--r--driver/tcpm/rt1718s.c2
-rw-r--r--driver/tcpm/rt1718s.h8
2 files changed, 9 insertions, 1 deletions
diff --git a/driver/tcpm/rt1718s.c b/driver/tcpm/rt1718s.c
index 6e7499cbb9..8d36d3e0b3 100644
--- a/driver/tcpm/rt1718s.c
+++ b/driver/tcpm/rt1718s.c
@@ -88,7 +88,7 @@ int rt1718s_read16(int port, int reg, int *val)
}
-static int rt1718s_sw_reset(int port)
+int rt1718s_sw_reset(int port)
{
int rv;
diff --git a/driver/tcpm/rt1718s.h b/driver/tcpm/rt1718s.h
index c2847cea9b..4b8ea5972e 100644
--- a/driver/tcpm/rt1718s.h
+++ b/driver/tcpm/rt1718s.h
@@ -260,4 +260,12 @@ int rt1718s_set_frs_enable(int port, int enable);
*/
int rt1718s_frs_init(int port);
+
+/**
+ * Software reset RT1718S
+ *
+ * @param port USB-C port
+ * @return EC_SUCCESS if success, EC_ERROR_UNKNOWN otherwise.
+ */
+int rt1718s_sw_reset(int port);
#endif /* __CROS_EC_USB_PD_TCPM_MT6370_H */