summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Lundmark <lndmrk@chromium.org>2018-05-22 17:51:25 +0200
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-06-13 21:00:15 +0000
commit6146d4d3f41dc454625dffe172563156c9e6ed1e (patch)
treeb29323e28ab53e3e09d5cbbac8d42bc4f2ad65f5
parent7542dfdc722ba27f6a17fcd3a25e2d8d301d443b (diff)
downloadchrome-ec-6146d4d3f41dc454625dffe172563156c9e6ed1e.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> (cherry picked from commit cc7889bfaec9243ff35b6a366f6f2c7c65c33a13) Reviewed-on: https://chromium-review.googlesource.com/1096935 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--common/usb_port_power_dumb.c4
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;