summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Chen <marcochen@chromium.org>2019-05-21 20:19:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-05-23 02:14:36 -0700
commit43f4771fd02723592f99ed093db27f4ba67d24ed (patch)
tree1d5a618717b8596dd6cbf4098fc1ea374c0d8d57
parent2a3f85bb5e6539a802161c8ddd98111e0b048e2b (diff)
downloadchrome-ec-43f4771fd02723592f99ed093db27f4ba67d24ed.tar.gz
rammus: turn USB type-A charging mode on by CONFIG of default mode not CDP.
In usb_port_power_smart.c, we restore charging mode to CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE instead of USB_CHARGE_MODE_CDP directly. The benefit is that when we change the default mode, we don't need to amend usb_port_power_smart.c. This should be applied to this board.c as well. BUG=b:130767435 BRANCH=rammus TEST=`make BOARD=rammus -j4` Change-Id: I0aef5bf3856eca82cb210c2a48ba31065e58e710 Signed-off-by: Marco Chen <marcochen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1621450 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
-rw-r--r--board/rammus/board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/rammus/board.c b/board/rammus/board.c
index 4f703ed00d..03aabe7514 100644
--- a/board/rammus/board.c
+++ b/board/rammus/board.c
@@ -475,7 +475,7 @@ static void usb_charge_mode_init(void)
* the OS must send an event to EC to clear the
* inhibit_charging_in_suspend.
*/
- usb_charge_set_mode(0, USB_CHARGE_MODE_CDP,
+ usb_charge_set_mode(0, CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE,
USB_DISALLOW_SUSPEND_CHARGE);
}
DECLARE_HOOK(HOOK_INIT, usb_charge_mode_init, HOOK_PRIO_DEFAULT + 1);