Sean Rhodes | 5da05b6 | 2022-01-10 21:58:04 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | Scope (\_SB.PCI0.I2C7) |
| 4 | { |
| 5 | Device (H02C) |
| 6 | { |
| 7 | Name (_HID, "STAR0001") // _HID: Hardware ID |
| 8 | Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus) */) // _CID: Compatible ID |
| 9 | Name (_UID, 0x01) // _UID: Unique ID |
| 10 | Name (_DDN, "Touchpad") // _DDN: DOS Device Name |
| 11 | Name (_DEP, Package (0x02) // _DEP: Dependencies |
| 12 | { |
| 13 | GPO3, |
| 14 | I2C7 |
| 15 | }) |
| 16 | |
| 17 | Method (_STA, 0, NotSerialized) // _STA: Status |
| 18 | { |
| 19 | Return (0x0F) |
| 20 | } |
| 21 | |
| 22 | Name (_CRS, ResourceTemplate () |
| 23 | { |
| 24 | I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0, |
| 25 | AddressingMode7Bit, "\\_SB.PCI0.I2C7", |
| 26 | 0x00, ResourceConsumer, , Exclusive,) |
| 27 | GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault, 0x0000, |
| 28 | "\\_SB.GPO3", 0x00, ResourceConsumer, ,) |
| 29 | { |
| 30 | CONFIG_TRACKPAD_INTERRUPT |
| 31 | } |
| 32 | }) |
| 33 | |
| 34 | Name (_DSD, Package (0x02) // _DSD: Device-Specific Data |
| 35 | { |
| 36 | ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */, |
| 37 | Package (0x01) |
| 38 | { |
| 39 | Package (0x02) |
| 40 | { |
| 41 | "linux,probed", |
Felix Singer | dfbb634 | 2022-12-26 08:39:35 +0100 | [diff] [blame^] | 42 | 1 |
Sean Rhodes | 5da05b6 | 2022-01-10 21:58:04 +0000 | [diff] [blame] | 43 | } |
| 44 | } |
| 45 | }) |
| 46 | Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method |
| 47 | { |
| 48 | ToBuffer (Arg0, Local0) |
| 49 | If ((Local0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */)) |
| 50 | { |
| 51 | ToInteger (Arg2, Local1) |
| 52 | If (Local1 == 0x00) |
| 53 | { |
| 54 | ToInteger (Arg1, Local2) |
| 55 | If (Local2 == 0x01) |
| 56 | { |
| 57 | Return (Buffer (0x01) |
| 58 | { |
| 59 | 0x03 |
| 60 | }) |
| 61 | } Else { |
| 62 | Return (Buffer (0x01) |
| 63 | { |
| 64 | 0x00 |
| 65 | }) |
| 66 | } |
| 67 | } |
| 68 | If ((Local1 == 0x01)) |
| 69 | { |
| 70 | Return (0x20) |
| 71 | } |
| 72 | Return (Buffer (0x01) |
| 73 | { |
| 74 | 0x00 |
| 75 | }) |
| 76 | } |
| 77 | Return (Buffer (0x01) |
| 78 | { |
| 79 | 0x00 |
| 80 | }) |
| 81 | } |
| 82 | } |
| 83 | } |