diff options
author | Edward Hill <ecgh@chromium.org> | 2018-01-22 13:38:17 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-23 17:41:45 -0800 |
commit | bd9d0d054be7ab3b18adfb373135ec2554cd823f (patch) | |
tree | 79673a7a3d3aa9cfbec5ce49ddf67a81959cf19d | |
parent | adeb276aa6a4a1cc341334e8c5db45e16fa8b6c5 (diff) | |
download | chrome-ec-bd9d0d054be7ab3b18adfb373135ec2554cd823f.tar.gz |
grunt: Move TCPC init to init hook
All init hooks complete before tasks are started (since
crrev.com/c/456628), so board_tcpc_init will finish before
the PD tasks start.
Using the init hook instead of CONFIG_USB_PD_TCPC_BOARD_INIT
avoids the problem of board_tcpc_init being called by every
PD task.
BUG=b:72229154
BRANCH=none
TEST=PD still works on grunt,
board_tcpc_init is only called once,
PD task init happens after board_tcpc_init finishes
Change-Id: Ie1263dffce06e9ea2433cc2d08d1537e4a891d40
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/879358
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r-- | board/grunt/board.c | 1 | ||||
-rw-r--r-- | board/grunt/board.h | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index c3ba3b7374..9d9cb14d67 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -313,6 +313,7 @@ void board_tcpc_init(void) mux->hpd_update(port, 0, 0); } } +DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C + 1); void board_overcurrent_event(int port) { diff --git a/board/grunt/board.h b/board/grunt/board.h index 9356ad74f6..ceeb2584e2 100644 --- a/board/grunt/board.h +++ b/board/grunt/board.h @@ -78,7 +78,6 @@ #define CONFIG_USB_PD_LOGGING #define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0 #define CONFIG_USB_PD_PORT_COUNT 2 -#define CONFIG_USB_PD_TCPC_BOARD_INIT #define CONFIG_USB_PD_TCPC_LOW_POWER #define CONFIG_USB_PD_TCPM_ANX74XX #define CONFIG_USB_PD_TCPM_MUX |