diff options
author | Furquan Shaikh <furquan@google.com> | 2018-04-27 12:28:22 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-06-06 11:38:38 +0000 |
commit | 29071d2577c99a8a1cb9489ec11a70e6c22d4ab7 (patch) | |
tree | d6e8c3396a128000a76a687d8642544c13ea3b2a | |
parent | b032f73b24a0d3501a1202aa7b060e0bb0747162 (diff) | |
download | chrome-ec-29071d2577c99a8a1cb9489ec11a70e6c22d4ab7.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>
(cherry picked from commit ec74ffb91f20f271bf28442c22c13c602cf02492)
Reviewed-on: https://chromium-review.googlesource.com/1087521
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Trybot-Ready: Furquan Shaikh <furquan@chromium.org>
-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 46ea9e4e9b..b47774330b 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -409,7 +409,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) @@ -444,6 +444,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); |