summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/usbc_ppc.c10
-rw-r--r--test/usb_ppc.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/common/usbc_ppc.c b/common/usbc_ppc.c
index c3710c0852..cd37e0e8cf 100644
--- a/common/usbc_ppc.c
+++ b/common/usbc_ppc.c
@@ -125,12 +125,12 @@ int ppc_clear_oc_event_counter(int port)
int ppc_is_sourcing_vbus(int port)
{
- int rv = EC_ERROR_UNIMPLEMENTED;
+ int rv = 0;
const struct ppc_config_t *ppc;
if ((port < 0) || (port >= ppc_cnt)) {
CPRINTS("%s(%d) Invalid port!", __func__, port);
- return EC_ERROR_INVAL;
+ return 0;
}
ppc = &ppc_chips[port];
@@ -197,7 +197,7 @@ int ppc_is_port_latched_off(int port)
{
if ((port < 0) || (port >= ppc_cnt)) {
CPRINTS("%s(%d) Invalid port!", __func__, port);
- return EC_ERROR_INVAL;
+ return 0;
}
return oc_event_cnt_tbl[port] >= PPC_OC_CNT_THRESH;
@@ -346,12 +346,12 @@ int ppc_set_frs_enable(int port, int enable)
#ifdef CONFIG_USB_PD_VBUS_DETECT_PPC
int ppc_is_vbus_present(int port)
{
- int rv = EC_ERROR_UNIMPLEMENTED;
+ int rv = 0;
const struct ppc_config_t *ppc;
if ((port < 0) || (port >= ppc_cnt)) {
CPRINTS("%s(%d) Invalid port!", __func__, port);
- return EC_ERROR_INVAL;
+ return 0;
}
ppc = &ppc_chips[port];
diff --git a/test/usb_ppc.c b/test/usb_ppc.c
index af4555ca8d..0cf6f69bf3 100644
--- a/test/usb_ppc.c
+++ b/test/usb_ppc.c
@@ -56,9 +56,9 @@ static int test_ppc_is_sourcing_vbus(void)
int rv;
rv = ppc_is_sourcing_vbus(1);
- TEST_ASSERT(rv == EC_ERROR_INVAL);
+ TEST_ASSERT(rv == 0);
rv = ppc_is_sourcing_vbus(0);
- TEST_ASSERT(rv == EC_ERROR_UNIMPLEMENTED);
+ TEST_ASSERT(rv == 0);
return EC_SUCCESS;
}
@@ -164,9 +164,9 @@ static int test_ppc_is_vbus_present(void)
int rv;
rv = ppc_is_vbus_present(1);
- TEST_ASSERT(rv == EC_ERROR_INVAL);
+ TEST_ASSERT(rv == 0);
rv = ppc_is_vbus_present(0);
- TEST_ASSERT(rv == EC_ERROR_UNIMPLEMENTED);
+ TEST_ASSERT(rv == 0);
return EC_SUCCESS;
}