diff options
author | Yilun Lin <yllin@chromium.org> | 2019-08-20 13:46:44 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-22 08:48:58 +0000 |
commit | be490b7261308362c6831ba2804c1504ba6aac15 (patch) | |
tree | df7beea4424b322f718ce9016d89eb4314188ae6 /board | |
parent | 60c1f84d024395fac90f144ad5a027f56b5ff3d0 (diff) | |
download | chrome-ec-be490b7261308362c6831ba2804c1504ba6aac15.tar.gz |
power: Replace weak attr with __overridable
This CL annotates __overridable to the following functions:
board_system_is_idle
power_chipset_handle_host_sleep_event
power_board_handle_host_sleep_event
TEST=make buildall
BUG=none
BRANCH=none
Change-Id: I0168b69c49fab5672238711d4f3a6a5517cdd8b3
Signed-off-by: Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1761759
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/atlas/board.c | 3 | ||||
-rw-r--r-- | board/nautilus/board.c | 3 | ||||
-rw-r--r-- | board/nocturne/board.c | 3 | ||||
-rw-r--r-- | board/poppy/board.c | 3 | ||||
-rw-r--r-- | board/rammus/board.c | 3 | ||||
-rw-r--r-- | board/samus/board.c | 4 |
6 files changed, 12 insertions, 7 deletions
diff --git a/board/atlas/board.c b/board/atlas/board.c index 1c86e589d8..6f49c78e91 100644 --- a/board/atlas/board.c +++ b/board/atlas/board.c @@ -365,7 +365,8 @@ static void board_pmic_enable_slp_s0_vr_decay(void) BD99992GW_REG_V085ACNT, 0x6a); } -void power_board_handle_host_sleep_event(enum host_sleep_event state) +__override void power_board_handle_host_sleep_event( + enum host_sleep_event state) { if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) board_pmic_enable_slp_s0_vr_decay(); diff --git a/board/nautilus/board.c b/board/nautilus/board.c index 5f79473bd7..48b316cd45 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -378,7 +378,8 @@ static void board_pmic_enable_slp_s0_vr_decay(void) i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992_FLAGS, 0x38, 0x7a); } -void power_board_handle_host_sleep_event(enum host_sleep_event state) +__override void power_board_handle_host_sleep_event( + enum host_sleep_event state) { if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) board_pmic_enable_slp_s0_vr_decay(); diff --git a/board/nocturne/board.c b/board/nocturne/board.c index faf18c359f..16a30571d4 100644 --- a/board/nocturne/board.c +++ b/board/nocturne/board.c @@ -520,7 +520,8 @@ static void board_pmic_enable_slp_s0_vr_decay(void) i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992_FLAGS, 0x38, 0x6a); } -void power_board_handle_host_sleep_event(enum host_sleep_event state) +__override void power_board_handle_host_sleep_event( + enum host_sleep_event state) { if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) board_pmic_enable_slp_s0_vr_decay(); diff --git a/board/poppy/board.c b/board/poppy/board.c index a6125ff3c6..b4eae018f3 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -468,7 +468,8 @@ static void board_pmic_enable_slp_s0_vr_decay(void) i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992_FLAGS, 0x38, 0x7a); } -void power_board_handle_host_sleep_event(enum host_sleep_event state) +__override void power_board_handle_host_sleep_event( + enum host_sleep_event state) { if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) board_pmic_enable_slp_s0_vr_decay(); diff --git a/board/rammus/board.c b/board/rammus/board.c index 6ba7907346..660ca860bc 100644 --- a/board/rammus/board.c +++ b/board/rammus/board.c @@ -390,7 +390,8 @@ static void board_pmic_enable_slp_s0_vr_decay(void) i2c_write8(I2C_PORT_PMIC, I2C_ADDR_BD99992_FLAGS, 0x38, 0x7a); } -void power_board_handle_host_sleep_event(enum host_sleep_event state) +__override void power_board_handle_host_sleep_event( + enum host_sleep_event state) { if (state == HOST_SLEEP_EVENT_S0IX_SUSPEND) board_pmic_enable_slp_s0_vr_decay(); diff --git a/board/samus/board.c b/board/samus/board.c index 02b80940f8..a7ec373d62 100644 --- a/board/samus/board.c +++ b/board/samus/board.c @@ -478,8 +478,8 @@ enum ec_error_list keyboard_scancode_callback(uint16_t *make_code, #define HIBERNATE_BATT_PCT 10 #define HIBERNATE_BATT_SEC (3600 * 24) -enum critical_shutdown board_system_is_idle(uint64_t last_shutdown_time, - uint64_t *target, uint64_t now) +__override enum critical_shutdown board_system_is_idle( + uint64_t last_shutdown_time, uint64_t *target, uint64_t now) { if (charge_get_percent() <= HIBERNATE_BATT_PCT) { uint64_t t = last_shutdown_time + HIBERNATE_BATT_SEC * SEC_UL; |