aboutsummaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/ec.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2016-11-21 20:14:07 -0800
committerMartin Roth <martinroth@google.com>2016-12-06 21:55:43 +0100
commitea79d2b3a3ddcb7909ac2862ebfda19c6b8823ae (patch)
treec4eeb5e491da3642ec8c85bcd09a51828a35ee5f /src/ec/google/chromeec/ec.h
parent3a0cb458dcca564f006ed2c322eeb683f269776f (diff)
google/chromeec: Add command to control USB PD role
Normally firmware should have no business messing with the USB PD role (source/sink/whatever) in the EC. But, as so often happens, ugly issues crop up that require weird work-arounds, and before you know it you need to do this for some reason that only makes sense in context. I do now, so add this function to send the necessary host command in the simplest possible fashion. BRANCH=gru BUG=chrome-os-partner:59346 TEST=Used it in a follow-up patch. Change-Id: I07d40feafd6a8387a633d6384efb205baf578d76 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 8b71767caccff9b77d458182ce8066f7abf6321c Original-Change-Id: Ie8d0be98f6b703f4db062fe2f728cd2588347202 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/413030 Original-Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-on: https://review.coreboot.org/17627 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/ec/google/chromeec/ec.h')
-rw-r--r--src/ec/google/chromeec/ec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/ec.h b/src/ec/google/chromeec/ec.h
index f765fe46ba..71cea7ea8a 100644
--- a/src/ec/google/chromeec/ec.h
+++ b/src/ec/google/chromeec/ec.h
@@ -76,6 +76,7 @@ enum usb_charge_mode {
USB_CHARGE_MODE_DOWNSTREAM_1500MA,
};
int google_chromeec_set_usb_charge_mode(u8 port_id, enum usb_charge_mode mode);
+int google_chromeec_set_usb_pd_role(u8 port, enum usb_pd_control_role role);
/* internal structure to send a command to the EC and wait for response. */
struct chromeec_command {