1/* SPDX-License-Identifier: GPL-2.0-only */ 2 Scope (\_SB.PCI0.I2C4) 3 { 4 Device (TPAD) 5 { 6 Name(_ADR, 1) 7 Name (_HID, "ALPS0001") 8 Name (_CID, "PNP0C50") 9 Name (_DDN, "ALPS Touchpad") 10 Name (_UID, 1) 11 Name (ISTP, 1) /* Touchpad */ 12 Name (_CRS, ResourceTemplate() 13 { 14 I2cSerialBus ( 15 0x2C, // SlaveAddress 16 ControllerInitiated, // SlaveMode 17 400000, // ConnectionSpeed 18 AddressingMode7Bit, // AddressingMode 19 "\\_SB.PCI0.I2C4", // ResourceSource 20 ) 21 Interrupt (ResourceConsumer, Level, ActiveLow) 22 { 23 GPIO_18_IRQ 24 } 25 GpioInt (Level, ActiveLow, ExclusiveAndWake, PullUp, 0x0000, "\\_SB.GPO1", 0x00, ResourceConsumer, ,) 26 { 27 18 28 } 29 }) 30 31 Method (_STA) 32 { 33 Return (0xF) 34 } 35 Method(_DSM, 0x4, NotSerialized) 36 { 37 // DSM UUID for HIDI2C - HID driver does not load without DSM 38 If(Arg0 == ToUUID("3CDFF6F7-4267-4555-AD05-B30A3D8938DE")) 39 { 40 // Function 0 : Query Function 41 If(Arg2 == 0) 42 { 43 // Revision 1 44 If(Arg1 == 1) 45 { 46 Return (Buffer (1) {0x03}) 47 } 48 Else 49 { 50 Return (Buffer (1) {0x00}) 51 } 52 } ElseIf (Arg2 == 1) { // Function 1 : HID Function 53 // HID Descriptor Address (IHV Specific) 54 Return(0x0020) 55 } Else { 56 Return (Buffer (1) {0x00}) 57 } 58 } Else { 59 Return (Buffer (1) {0x00}) 60 } 61 } 62 } 63} 64