From 43f4771fd02723592f99ed093db27f4ba67d24ed Mon Sep 17 00:00:00 2001 From: Marco Chen Date: Tue, 21 May 2019 20:19:30 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1621450 Legacy-Commit-Queue: Commit Bot Reviewed-by: Zhuohao Lee --- board/rammus/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1