diff options
author | Peter Marheine <pmarheine@chromium.org> | 2020-07-01 16:20:16 +1000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-01 18:33:49 +0000 |
commit | 70ff3fbb9d7ebf9a20b42fecf7cdac0639347f7a (patch) | |
tree | 6e41d8fc095553275ea52c0f428eb1d1b5968a5a /include/usb_pd_tcpm.h | |
parent | eccff54c3a6ae63f77fbc8544f770fae1f100715 (diff) | |
download | chrome-ec-70ff3fbb9d7ebf9a20b42fecf7cdac0639347f7a.tar.gz |
tcpm: allow returning a status from set_frs_enable
The old declaration with void is incompatible with the use of
tcpci_tcpc_fast_role_swap_enable in the one driver that currently
implements that function, causing build failure when
CONFIG_USB_PC_FRS_TCPC is enabled and using the nct38xx TCPC driver.
Because the underlying function may fail, walk up the stack and make all
users capable of failure as well (however the top level user currently
ignores the result).
BUG=b:146393213
BRANCH=None
TEST=make buildall
Change-Id: Ib8cabf4a435731ed804a3cc4696dfea97eef3c98
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276124
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r-- | include/usb_pd_tcpm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 0441af6299..ba7b0ef8aa 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -392,8 +392,10 @@ struct tcpm_drv { * * @param port Type-C port number * @param enable FRS enable (true) disable (false) + * + * @return EC_SUCCESS or error */ - void (*set_frs_enable)(int port, int enable); + int (*set_frs_enable)(int port, int enable); /** * Handle TCPCI Faults |