diff options
author | Rong Chang <rongchang@chromium.org> | 2015-09-11 18:51:58 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-14 00:48:39 -0700 |
commit | 8db5a8185a704baff52947459bffb565aa9f3319 (patch) | |
tree | e064c79203aa643a575e8fdbeb30e5c214866e05 | |
parent | 2eabf6fe8cffdd2c1e125344aa1692fab6795759 (diff) | |
download | chrome-ec-8db5a8185a704baff52947459bffb565aa9f3319.tar.gz |
oak: remove dual-port charge enable workaround
This change picks CL:298067 into oak. Removes workaround for initial
board version. Also cleanup unnecessary TODO in usb_pd_policy.
BUG=none
BRANCH=none
TEST=tested on oak, plug low power charge to one port, then plug in
zinger. check charge port becomes the high power one.
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Signed-off-by: Rong Chang <rongchang@chromium.org>
Change-Id: I134be07d89fefad124eb6cceebf862a83e8bd3b4
Reviewed-on: https://chromium-review.googlesource.com/299150
-rw-r--r-- | board/oak/board.c | 12 | ||||
-rw-r--r-- | board/oak/usb_pd_policy.c | 10 |
2 files changed, 4 insertions, 18 deletions
diff --git a/board/oak/board.c b/board/oak/board.c index 3ad925b042..ab5befef9c 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -258,15 +258,9 @@ int board_set_active_charge_port(int charge_port) CPRINTF("New chg p%d", charge_port); if (charge_port == CHARGE_PORT_NONE) { - /* - * TODO: currently we only get VBUS knowledge when charge - * is enabled. so, when not changing, we need to enable - * both ports. but, this is dangerous if you have two - * chargers plugged in and you set charge override to -1 - * then it will enable both sides! - */ - gpio_set_level(GPIO_USB_C0_CHARGE_L, 0); - gpio_set_level(GPIO_USB_C1_CHARGE_L, 0); + /* Disable both ports */ + gpio_set_level(GPIO_USB_C0_CHARGE_L, 1); + gpio_set_level(GPIO_USB_C1_CHARGE_L, 1); } else { /* Make sure non-charging port is disabled */ gpio_set_level(charge_port ? GPIO_USB_C0_CHARGE_L : diff --git a/board/oak/usb_pd_policy.c b/board/oak/usb_pd_policy.c index 9849d41069..db447384a1 100644 --- a/board/oak/usb_pd_policy.c +++ b/board/oak/usb_pd_policy.c @@ -90,15 +90,7 @@ void pd_power_supply_reset(int port) gpio_set_level(port ? GPIO_USB_C1_5V_EN : GPIO_USB_C0_5V_EN, 0); - /* - * TODO: Currently we can only detect VBUS when charge_l is - * asserted, so, if there is no active charge port, then enable - * charge_l. If the other port is the active charger, then leave - * this port disabled. - */ - if (charge_manager_get_active_charge_port() != !port) - gpio_set_level(port ? GPIO_USB_C1_CHARGE_L : - GPIO_USB_C0_CHARGE_L, 0); + pd_send_host_event(PD_EVENT_POWER_CHANGE); } void pd_set_input_current_limit(int port, uint32_t max_ma, |