summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
Diffstat (limited to 'chip')
-rw-r--r--chip/lm4/lpc.c11
-rw-r--r--chip/lm4/pwm.c16
2 files changed, 27 insertions, 0 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index 29bd66d52c..64cdfb2d50 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -481,3 +481,14 @@ static int lpc_init(void)
return EC_SUCCESS;
}
DECLARE_HOOK(HOOK_INIT, lpc_init, HOOK_PRIO_DEFAULT);
+
+
+static int lpc_resume(void)
+{
+ /* Mask all host events until the host unmasks them itself. */
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, 0);
+ return EC_SUCCESS;
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, lpc_resume, HOOK_PRIO_DEFAULT);
diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c
index 62bd08a571..e27dbac831 100644
--- a/chip/lm4/pwm.c
+++ b/chip/lm4/pwm.c
@@ -342,3 +342,19 @@ static int pwm_init(void)
return EC_SUCCESS;
}
DECLARE_HOOK(HOOK_INIT, pwm_init, HOOK_PRIO_DEFAULT);
+
+
+static int pwm_resume(void)
+{
+ pwm_enable_fan(1);
+ return EC_SUCCESS;
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, pwm_resume, HOOK_PRIO_DEFAULT);
+
+
+static int pwm_suspend(void)
+{
+ pwm_enable_fan(0);
+ return EC_SUCCESS;
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, pwm_suspend, HOOK_PRIO_DEFAULT);