summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-09-16 15:44:48 -0600
committerCommit Bot <commit-bot@chromium.org>2021-03-18 23:18:33 +0000
commit4a1591bb8a08b65baf394c96d6860a1c0561f729 (patch)
treeeb72f63cfde298575d18ddb74acae46c3ca27b4c /power
parent3f940a5e45a8db587efff0721d4038c59cb702e3 (diff)
downloadchrome-ec-4a1591bb8a08b65baf394c96d6860a1c0561f729.tar.gz
Hooks: Add HOOK_CHIPSET_HARD_OFF
Add a new hook called HOOK_CHIPSET_HARD_OFF which is called upon entry to the G3 power state. BRANCH=None BUG=b:166787955,b:167996216,chromium:1045209 TEST=make -j buildall, runs on waddledee with no linking errors Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: If260207910d882d17aeb766c9e99a7a6099006c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415171 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/power/common.c b/power/common.c
index ea6190d523..1ea6439563 100644
--- a/power/common.c
+++ b/power/common.c
@@ -693,6 +693,10 @@ void chipset_task(void *u)
if (new_state != state) {
power_set_state(new_state);
power_set_active_wake_mask();
+
+ /* Call hooks before we enter G3 */
+ if (new_state == POWER_G3)
+ hook_notify(HOOK_CHIPSET_HARD_OFF);
}
}
}