summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin/acpi/suspend.asl
blob: 08ca787113688c852923471a992821e4f9deaee4 (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
/* SPDX-License-Identifier: GPL-2.0-only */

Method (RPTS, 1, NotSerialized)
{
	\_SB.PCI0.LPCB.EC.OSFG = 0x00

	If ((Arg0 == 0x04) || (Arg0 == 0x05))
	{
		/* Store current EC settings in CMOS */
		\_SB.PCI0.LPCB.TPLC = \_SB.PCI0.LPCB.EC.TPLE
		\_SB.PCI0.LPCB.FLKC = \_SB.PCI0.LPCB.EC.FLKE
		\_SB.PCI0.LPCB.KLSC = \_SB.PCI0.LPCB.EC.KLSE
		\_SB.PCI0.LPCB.KLBC = \_SB.PCI0.LPCB.EC.KLBE
	}
}

Method (RWAK, 1, Serialized)
{
	\_SB.PCI0.LPCB.EC.OSFG = 0x01

	/* Restore EC settings from CMOS */
	\_SB.PCI0.LPCB.EC.TPLE = \_SB.PCI0.LPCB.TPLC
	\_SB.PCI0.LPCB.EC.FLKE = \_SB.PCI0.LPCB.FLKC
	\_SB.PCI0.LPCB.EC.KLSE = \_SB.PCI0.LPCB.KLSC
	\_SB.PCI0.LPCB.EC.KLBE = \_SB.PCI0.LPCB.KLBC
}