summaryrefslogtreecommitdiff
path: root/board/asurada/usb_pd_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/asurada/usb_pd_policy.c')
-rw-r--r--board/asurada/usb_pd_policy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/asurada/usb_pd_policy.c b/board/asurada/usb_pd_policy.c
index ed10dd11db..741b3debc6 100644
--- a/board/asurada/usb_pd_policy.c
+++ b/board/asurada/usb_pd_policy.c
@@ -10,6 +10,18 @@
#error Asurada reference must define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT
#endif
+int svdm_get_hpd_gpio(int port)
+{
+ /* HPD is low active, inverse the result */
+ return !gpio_get_level(GPIO_EC_DPBRDG_HPD_ODL);
+}
+
+void svdm_set_hpd_gpio(int port, int en)
+{
+ /* HPD is low active, inverse the en */
+ gpio_set_level(GPIO_EC_DPBRDG_HPD_ODL, !en);
+}
+
int pd_snk_is_vbus_provided(int port)
{
return ppc_is_vbus_present(port);