diff options
author | Furquan Shaikh <furquan@google.com> | 2018-04-27 12:28:22 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-01 05:35:47 -0700 |
commit | ec74ffb91f20f271bf28442c22c13c602cf02492 (patch) | |
tree | 22eaaf0f1e8fc76c5cdeede421fec3038d40154d /board/nautilus | |
parent | a26cdd08128a33a7cd39ce59d89e6e79d88e4260 (diff) | |
download | chrome-ec-ec74ffb91f20f271bf28442c22c13c602cf02492.tar.gz |
nautilus: Move PMIC init to a deferred function
Instead of doing I2C traffic in an init hook, move it to a
deferred function to be called outside of INIT_HOOK processing.
(identical to CL:1001474 on eve branch, moved to nautilus board
file)
BUG=b:77336348
BRANCH=poppy
TEST=None
Change-Id: Id9eec4333c6f04141e475b61e5aea7b838dcedf7
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1033614
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'board/nautilus')
-rw-r--r-- | board/nautilus/board.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/board/nautilus/board.c b/board/nautilus/board.c index dc8cb0094f..c7ef416bd8 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -419,7 +419,7 @@ static void board_pmic_init(void) /* VRMODECTRL - disable low-power mode for all rails */ i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x3b, 0x1f); } -DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT); +DECLARE_DEFERRED(board_pmic_init); /* Initialize board. */ static void board_init(void) @@ -454,6 +454,9 @@ static void board_init(void) /* Enable Gyro interrupts */ gpio_enable_interrupt(GPIO_ACCELGYRO3_INT_L); + + /* Initialize PMIC */ + hook_call_deferred(&board_pmic_init_data, 0); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); |