mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 14:01:54 +00:00
glados: Revise PMIC initialization
- PMIC init can be called from HOOK_INIT now that this happens after the scheduler has started. - There's no need to re-initialize the PMIC on sysjump BUG=None TEST=Verify glados boots to S0 BRANCH=None Change-Id: I1839e1bd357759ae2800d812b27bf4e0cd7772b4 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/293012 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
f4ba3b2fa3
commit
fe150a64e9
@@ -23,6 +23,7 @@
|
||||
#include "power_button.h"
|
||||
#include "spi.h"
|
||||
#include "switch.h"
|
||||
#include "system.h"
|
||||
#include "task.h"
|
||||
#include "temp_sensor.h"
|
||||
#include "timer.h"
|
||||
@@ -199,8 +200,12 @@ const struct button_config buttons[CONFIG_BUTTON_COUNT] = {
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static void pmic_init(void)
|
||||
static void board_pmic_init(void)
|
||||
{
|
||||
/* No need to re-init PMIC since settings are sticky across sysjump */
|
||||
if (system_jumped_to_this_image())
|
||||
return;
|
||||
|
||||
/*
|
||||
* Set V085ACNT / V0.85A Control Register:
|
||||
* Lower power mode = 0.7V.
|
||||
@@ -208,7 +213,7 @@ static void pmic_init(void)
|
||||
*/
|
||||
i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992, 0x38, 0x7a);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, pmic_init, HOOK_PRIO_DEFAULT);
|
||||
DECLARE_HOOK(HOOK_INIT, board_pmic_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/* Initialize board. */
|
||||
static void board_init(void)
|
||||
|
||||
Reference in New Issue
Block a user