diff options
author | Caveh Jalali <caveh@google.com> | 2017-07-31 17:07:47 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-03 19:23:13 -0700 |
commit | 28bfc8037156ba0f9c8189ef6e8b7c8a7d22d4cc (patch) | |
tree | 204fcc8cfa5867f2dc636a284ca7248563e57558 /include/usb_pd_tcpm.h | |
parent | e01813adc7dab9737b13f4846c29c9770b39e888 (diff) | |
download | chrome-ec-28bfc8037156ba0f9c8189ef6e8b7c8a7d22d4cc.tar.gz |
PD_CONTROL: add subcommand to power up a TCPC.
add a subcommand to the PD_CONTROL message to power up a specific
TCPC. in practice, this typically just takes the TCPC out of sleep
mode for cases where sleep mode is controlled by the EC.
under the covers, board_set_tcpc_power_mode() gets a weak function
definition so we don't need to special case this everywhere.
TEST="make buildall" passes; "make tests" passes for reef.
BRANCH=none
BUG=b:35586895
Change-Id: Ib50e265d11eca10c3714049d8cfdf2657eff48c1
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://chromium-review.googlesource.com/596796
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r-- | include/usb_pd_tcpm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 3f231fb3f7..edcd3f5875 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -243,6 +243,14 @@ struct tcpc_config_t { uint16_t tcpc_get_alert_status(void); /** + * Optional, set the TCPC power mode. + * + * @param port Type-C port number + * @param mode 0: off/sleep, 1: on/awake + */ +void board_set_tcpc_power_mode(int port, int mode) __attribute__((weak)); + +/** * Initialize TCPC. * * @param port Type-C port number |