mb/google/brya: Create rull variant
[coreboot2.git] / src / mainboard / lenovo / s230u / acpi / gpe.asl
blob1488a0a020321f0cdb85579e264f56b0655bd656
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 Scope (_GPE)
5         Name (PDET, 0)
6         Method (PNOT, 2, Serialized) {
7                 Local0 = Arg0 << Arg1
8                 Local1 = ~(1 << Arg1)
9                 PDET = Local0 | (Local1 & PDET)
10                 If (PDET == 0) {
11                         // Palm removed
12                         \_SB.PCI0.LPCB.EC0.HKEY.MHKQ (0x60B1)
13                 } Else {
14                         // Palm detected
15                         \_SB.PCI0.LPCB.EC0.HKEY.MHKQ (0x60B0)
16                 }
17         }
19         Method (TINV, 2, Serialized) {
20                 Local0 = 1 << Arg1
21                 If (Arg0 == 0) {
22                         Local0 = ~Local0
23                         GIV0 &= Local0
24                 } Else {
25                         GIV0 |= Local0
26                 }
27         }
29         /* Palm detect sensor 1 */
30         Method (_L12, 0, NotSerialized) {
31                 // Invert trigger
32                 TINV (GP02, 2)
34                 PNOT (GP02, 0)
35         }
37         /* Palm detect sensor 2 */
38         Method (_L14, 0, NotSerialized) {
39                 // Invert trigger
40                 TINV (GP04, 4)
42                 PNOT (GP04, 1)
43         }