mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-15 00:56:22 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
a26cdd0812
commit
ec74ffb91f
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user