diff options
author | Alexandru M Stan <amstan@chromium.org> | 2015-01-15 13:51:59 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-16 20:37:07 +0000 |
commit | fe294979d6cc80a7ab71c2997502bfa2abd2912a (patch) | |
tree | a322c36b20cf7d8ef1f895f35d84de5deb32f03b /include/hooks.h | |
parent | 7893715cb7ef471002893ed128c241a8e8dfdacb (diff) | |
download | chrome-ec-fe294979d6cc80a7ab71c2997502bfa2abd2912a.tar.gz |
I2C: Increase priority of i2c_init
Chipset sometimes needs I2C, therefore i2c_init should have a higher priority
than power_common_init so i2c is available by the time the chipset might be
talking to the battery.
BUG=chrome-os-partner:35502, chrome-os-partner:35173
TEST=There is no "battery not responding" message at startup on veyron
TEST=EC boot takes less than 1 second on veyron
BRANCH=none
Change-Id: Ib10b653decc7703e706d4dd1976abf0fdbc25ac2
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/241102
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/hooks.h')
-rw-r--r-- | include/hooks.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/hooks.h b/include/hooks.h index 579aa0470f..a4a518354a 100644 --- a/include/hooks.h +++ b/include/hooks.h @@ -21,16 +21,18 @@ enum hook_priority { HOOK_PRIO_INIT_DMA = HOOK_PRIO_FIRST + 1, /* LPC inits before modules which need memory-mapped I/O */ HOOK_PRIO_INIT_LPC = HOOK_PRIO_FIRST + 1, + /* I2C is needed before chipset inits (battery communications). */ + HOOK_PRIO_INIT_I2C = HOOK_PRIO_FIRST + 2, /* Chipset inits before modules which need to know its initial state. */ - HOOK_PRIO_INIT_CHIPSET = HOOK_PRIO_FIRST + 2, + HOOK_PRIO_INIT_CHIPSET = HOOK_PRIO_FIRST + 3, /* Lid switch inits before power button */ - HOOK_PRIO_INIT_LID = HOOK_PRIO_FIRST + 3, + HOOK_PRIO_INIT_LID = HOOK_PRIO_FIRST + 4, /* Power button inits before chipset and switch */ - HOOK_PRIO_INIT_POWER_BUTTON = HOOK_PRIO_FIRST + 4, + HOOK_PRIO_INIT_POWER_BUTTON = HOOK_PRIO_FIRST + 5, /* PWM inits before modules which might use it (fans, LEDs) */ - HOOK_PRIO_INIT_PWM = HOOK_PRIO_FIRST + 5, + HOOK_PRIO_INIT_PWM = HOOK_PRIO_FIRST + 6, /* Extpower inits before modules which might use it (battery, LEDs) */ - HOOK_PRIO_INIT_EXTPOWER = HOOK_PRIO_FIRST + 6, + HOOK_PRIO_INIT_EXTPOWER = HOOK_PRIO_FIRST + 7, /* Specific values to lump temperature-related hooks together */ HOOK_PRIO_TEMP_SENSOR = 6000, |