blob: a11db5dacbdd4372b46f729590b9aa8e6f94836b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <superio/ite/common/ite.h>
#include "common_defines.h"
#include "led.h"
/* Change power led state based on sleep type. */
void mainboard_smi_sleep(u8 slp_typ)
{
printk(BIOS_DEBUG, "SMI: sleep S%d\n", slp_typ);
switch (slp_typ) {
case ACPI_S3:
/*
* Vendor firmware also only enables this when entering sleep.
* This saves some power when entering S5 via shutdown.
*/
ite_enable_3vsbsw(GPIO_DEV);
set_power_led(LED_YELLOW);
break;
case ACPI_S4:
/* Without 3vsbsw enabled the LED will be off in any case */
case ACPI_S5:
set_power_led(LED_OFF);
break;
default:
break;
}
}
|