diff options
author | Emil Lundmark <lndmrk@chromium.org> | 2018-05-22 17:51:25 +0200 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-29 06:02:18 -0700 |
commit | cc7889bfaec9243ff35b6a366f6f2c7c65c33a13 (patch) | |
tree | 984578b38a7e132dc898d26798f2e3391f66782d /common/usb_port_power_dumb.c | |
parent | 3eb6cd87a1873ee281a783cb1db405caeb78077f (diff) | |
download | chrome-ec-cc7889bfaec9243ff35b6a366f6f2c7c65c33a13.tar.gz |
usb_port_power: Use same name for mode set function
Dumb USB ports do not have the same notion of charge mode as smart
ports. However, the header common/usb_charge.h declares a function for
changing charge mode that the dumb USB port power implementation does
not define. Instead, it defines a similar function with a different
name, albeit with other allowed values for its second parameter.
This patch makes the names the same so the function can be used by
simply including the aforementioned header file.
BUG=none
BRANCH=fizz
TEST=emerge-fizz chromeos-ec
Change-Id: I87863f87f32f538cc1c723d9299afcc7353e1852
Signed-off-by: Emil Lundmark <lndmrk@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1069272
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/usb_port_power_dumb.c')
-rw-r--r-- | common/usb_port_power_dumb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_port_power_dumb.c b/common/usb_port_power_dumb.c index b909fd1c41..a37fb84c3f 100644 --- a/common/usb_port_power_dumb.c +++ b/common/usb_port_power_dumb.c @@ -47,7 +47,7 @@ static void usb_port_all_ports_off(void) /*****************************************************************************/ /* Host commands */ -int usb_port_set_mode(int port_id, enum usb_charge_mode mode) +int usb_charge_set_mode(int port_id, enum usb_charge_mode mode) { CPRINTS("USB port p%d %d", port_id, mode); @@ -72,7 +72,7 @@ static int usb_port_command_set_mode(struct host_cmd_handler_args *args) { const struct ec_params_usb_charge_set_mode *p = args->params; - if (usb_port_set_mode(p->usb_port_id, p->mode) != EC_SUCCESS) + if (usb_charge_set_mode(p->usb_port_id, p->mode) != EC_SUCCESS) return EC_RES_ERROR; return EC_RES_SUCCESS; |