From 95139fa58280335f302827d96154038a7c23e0c0 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Mon, 17 Apr 2017 11:33:37 -0700 Subject: usb_port_power: Allow variable number of ports Currently, usb_port_power_dumb allows fixed number of ports (2) and usb_port_power_smart allows less than 4 ports. This change removes the limitation and makes them accept variable number of ports. BUG=chromium:715178 BRANCH=none TEST=Verified usbchargemode returns consistent charge_mode across sysjumps on Electro. Change-Id: I7675c65ba03d3e6f7f53b2fe48cbe510231d945a Signed-off-by: Daisuke Nojiri Reviewed-on: https://chromium-review.googlesource.com/481077 Reviewed-by: Randall Spangler --- board/reef/board.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'board/reef') diff --git a/board/reef/board.c b/board/reef/board.c index 5db387f6b9..23247c4f95 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -299,6 +299,10 @@ struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { } }; +const int usb_port_enable[CONFIG_USB_PORT_POWER_SMART_PORT_COUNT] = { + GPIO_USB1_ENABLE, +}; + /* called from anx74xx_set_power_mode() */ void board_set_tcpc_power_mode(int port, int mode) { -- cgit v1.2.1