Angel Pons | 89ab250 | 2020-04-03 01:22:28 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 2 | |
| 3 | Scope (_GPE) |
| 4 | { |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 5 | Name (PDET, Zero) |
| 6 | Method (PNOT, 2, Serialized) { |
Felix Singer | 3c9291b | 2022-12-16 02:43:56 +0100 | [diff] [blame^] | 7 | Local0 = Arg0 << Arg1 |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 8 | Not( ShiftLeft (One, Arg1), Local1) |
| 9 | Or (Local0, And (Local1, PDET), PDET) |
Felix Singer | c191370 | 2022-12-11 21:01:06 +0100 | [diff] [blame] | 10 | If (PDET == Zero) { |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 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 | |
Martin Roth | 2f0bbbf | 2019-05-11 12:51:44 -0600 | [diff] [blame] | 19 | Method (TINV, 2, Serialized) { |
Felix Singer | 3c9291b | 2022-12-16 02:43:56 +0100 | [diff] [blame^] | 20 | Local0 = One << Arg1 |
Felix Singer | c191370 | 2022-12-11 21:01:06 +0100 | [diff] [blame] | 21 | If (Arg0 == Zero) { |
Martin Roth | 2f0bbbf | 2019-05-11 12:51:44 -0600 | [diff] [blame] | 22 | Not (Local0, Local0) |
| 23 | And (GIV0, Local0, GIV0) |
| 24 | } Else { |
| 25 | Or (GIV0, Local0, GIV0) |
| 26 | } |
| 27 | } |
| 28 | |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 29 | /* Palm detect sensor 1 */ |
| 30 | Method (_L12, 0, NotSerialized) { |
| 31 | // Invert trigger |
Martin Roth | 2f0bbbf | 2019-05-11 12:51:44 -0600 | [diff] [blame] | 32 | TINV (GP02, 2) |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 33 | |
| 34 | PNOT (GP02, 0) |
| 35 | } |
| 36 | |
| 37 | /* Palm detect sensor 2 */ |
| 38 | Method (_L14, 0, NotSerialized) { |
| 39 | // Invert trigger |
Martin Roth | 2f0bbbf | 2019-05-11 12:51:44 -0600 | [diff] [blame] | 40 | TINV (GP04, 4) |
Tobias Diedrich | cee930a | 2017-02-12 14:09:06 +0100 | [diff] [blame] | 41 | |
| 42 | PNOT (GP04, 1) |
| 43 | } |
| 44 | } |