1 /* SPDX-License-Identifier: GPL-2.0-only */
3 Method (RPTS, 1, Serialized)
6 /* Store current EC settings in CMOS */
7 Switch (ToInteger (\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.TPLE))))
9 // 0x00 == Enabled == 0x00
10 // 0x11 == Re-enabled == 0x00
11 // 0x22 == Disabled == 0x01
14 \_SB.PCI0.LPCB.TPLC = 0x00
18 \_SB.PCI0.LPCB.TPLC = 0x00
22 \_SB.PCI0.LPCB.TPLC = 0x01
27 \_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.FLKE))
29 Switch (ToInteger (\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLSE))))
31 // 0x00 == Disabled == 0x00
32 // 0xdd == Enabled == 0x01
35 \_SB.PCI0.LPCB.KLSC = 0x00
39 \_SB.PCI0.LPCB.KLSC = 0x01
43 Switch (ToInteger (\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLBE))))
46 // 0xcc == Off == 0x01
47 // 0xbb == Low == 0x02
48 // 0xaa == High == 0x03
51 \_SB.PCI0.LPCB.KLBC = 0x00
55 \_SB.PCI0.LPCB.KLBC = 0x01
59 \_SB.PCI0.LPCB.KLBC = 0x02
63 \_SB.PCI0.LPCB.KLBC = 0x03
68 * Disable ACPI support.
69 * This should always be the last action before entering S4 or S5.
71 \_SB.PCI0.LPCB.EC.ECWR(0x00, RefOf(\_SB.PCI0.LPCB.EC.OSFG))
74 Method (RWAK, 1, Serialized)
77 * Enable ACPI support.
78 * This should always be the first action when exiting S4 or S5.
80 \_SB.PCI0.LPCB.EC.ECWR(0x01, RefOf(\_SB.PCI0.LPCB.EC.OSFG))
82 /* Restore EC settings from CMOS */
83 Switch (ToInteger (\_SB.PCI0.LPCB.TPLC))
85 // 0x00 == Enabled == 0x00
86 // 0x00 == Re-enabled == 0x11
87 // 0x01 == Disabled == 0x22
90 \_SB.PCI0.LPCB.EC.ECWR (0x00, RefOf(\_SB.PCI0.LPCB.EC.TPLE))
94 \_SB.PCI0.LPCB.EC.ECWR (0x22, RefOf(\_SB.PCI0.LPCB.EC.TPLE))
98 \_SB.PCI0.LPCB.EC.ECWR (\_SB.PCI0.LPCB.FLKC, RefOf(\_SB.PCI0.LPCB.EC.FLKE))
100 Switch (ToInteger (\_SB.PCI0.LPCB.KLSC))
102 // 0x00 == Disabled == 0x00
103 // 0x01 == Enabled == 0xdd
106 \_SB.PCI0.LPCB.EC.ECWR (0x00, RefOf(\_SB.PCI0.LPCB.EC.KLSE))
110 \_SB.PCI0.LPCB.EC.ECWR (0xdd, RefOf(\_SB.PCI0.LPCB.EC.KLSE))
114 Switch (ToInteger (\_SB.PCI0.LPCB.KLBC))
116 // 0x00 == On == 0xdd
117 // 0x01 == Off == 0xcc
118 // 0x02 == Low == 0xbb
119 // 0x03 == High == 0xaa
122 \_SB.PCI0.LPCB.EC.ECWR (0xdd, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
126 \_SB.PCI0.LPCB.EC.ECWR (0xcc, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
130 \_SB.PCI0.LPCB.EC.ECWR (0xbb, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
134 \_SB.PCI0.LPCB.EC.ECWR (0xaa, RefOf(\_SB.PCI0.LPCB.EC.KLBE))