From 44676699b08f7f6ccaba3d8b89a41c79f3c29cb2 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 24 Jan 2017 10:55:46 -0800 Subject: pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h Servo_v4 requires the ability to have a different default state per port. In previous devices, the assumption was that each supported port had the same default usb pd state and power role. This CL moves the by the default power role which in turn is derived from CONFIG_USB_PD_DUAL_ROLE. In addiiton to moving the location, it now uses 'port' as argument so it can be port specific if required. PD_DEFAULT_STATE was a board.h specific config, but in practice each instance used to date was set to PD_STATE_SNK_DISCONNECTED if CONFIG_USB_PD_DUAL_ROLE was defined and set to PD_STATE_SRC_DISCONNECTED otherwise. BUG=chrome-os-partner:61878 BRANCH=servo TEST=Manual run 'make -j buildall' to verify that all instances of PD_DEFAULT_STATE were removed. Change-Id: Iaf40718668732f525485ed7942ee7fc246d3f75d Signed-off-by: Scott Reviewed-on: https://chromium-review.googlesource.com/431787 Reviewed-by: Vincent Palatin --- board/glados/board.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'board/glados') diff --git a/board/glados/board.h b/board/glados/board.h index 58d6fcbd8c..9ce659c216 100644 --- a/board/glados/board.h +++ b/board/glados/board.h @@ -190,9 +190,6 @@ enum als_id { ALS_COUNT }; -/* start as a sink in case we have no other power supply/battery */ -#define PD_DEFAULT_STATE PD_STATE_SNK_DISCONNECTED - /* TODO: determine the following board specific type-C power constants */ /* * delay to turn on the power supply max is ~16ms. -- cgit v1.2.1