| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
|
| 3 |
Scope (_GPE) |
| 4 |
{ |
| 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 |
} |
| 18 |
|
| 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 |
} |
| 28 |
|
| 29 |
/* Palm detect sensor 1 */ |
| 30 |
Method (_L12, 0, NotSerialized) { |
| 31 |
// Invert trigger |
| 32 |
TINV (GP02, 2) |
| 33 |
|
| 34 |
PNOT (GP02, 0) |
| 35 |
} |
| 36 |
|
| 37 |
/* Palm detect sensor 2 */ |
| 38 |
Method (_L14, 0, NotSerialized) { |
| 39 |
// Invert trigger |
| 40 |
TINV (GP04, 4) |
| 41 |
|
| 42 |
PNOT (GP04, 1) |
| 43 |
} |
| 44 |
} |