Device (TPD0)
{
Name (HID2, Zero)
Name (SBFB, ResourceTemplate ()
{
I2cSerialBusV2 (0x0000, ControllerInitiated, 0x00061A80,
AddressingMode7Bit, "NULL",
0x00, ResourceConsumer, _Y38, Exclusive,
)
})
Name (SBFG, ResourceTemplate ()
{
GpioInt (Level, ActiveLow, ExclusiveAndWake, PullDefault, 0x0000,
"\\_SB.PCI0.GPI0", 0x00, ResourceConsumer, ,
)
{ // Pin list
0x0000
}
})
Name (SBFI, ResourceTemplate ()
{
Interrupt (ResourceConsumer, Level, ActiveLow, ExclusiveAndWake, ,, _Y39)
{
0x00000000,
}
})
CreateWordField (SBFB, \_SB.PCI0.I2C0.TPD0._Y38._ADR, BADR) // _ADR: Address
CreateDWordField (SBFB, \_SB.PCI0.I2C0.TPD0._Y38._SPE, SPED) // _SPE: Speed
CreateWordField (SBFG, 0x17, INT1)
CreateDWordField (SBFI, \_SB.PCI0.I2C0.TPD0._Y39._INT, INT2) // _INT: Interrupts
Method (GTID, 1, Serialized)
{
If (Arg0)
{
Switch (CBID)
{
Case (0x0896)
{
Return ("DELL0896")
}
Case (0x0895)
{
Return ("DELL0895")
}
Case (0x0894)
{
Return ("DELL0894")
}
Case (0x08A5)
{
Return ("DELL08A5")
}
Case (0x08A6)
{
Return ("DELL08A6")
}
Case (0x089C)
{
Return ("DELL089C")
}
Case (0x089D)
{
Return ("DELL089D")
}
Case (0x089E)
{
Return ("DELL089E")
}
Case (0x089F)
{
Return ("DELL089F")
}
Case (0x08A7)
{
Return ("DELL08A7")
}
Case (0x08A8)
{
Return ("DELL08A8")
}
Case (0x08A9)
{
Return ("DELL08A9")
}
Case (0x08BC)
{
Return ("DELL08BC")
}
Case (0x08BD)
{
Return ("DELL08BD")
}
Case (0x08C0)
{
Return ("DELL08C0")
}
Case (0x0949)
{
Return ("DELL0949")
}
Default
{
Return ("DELL0896")
}
}
}
Else
{
Return (One)
}
}
Method (_INI, 0, Serialized) // _INI: Initialize
{
If (LLess (OSYS, 0x07DC))
{
SRXO (GPDI, One)
}
Store (GNUM (GPDI), INT1)
Store (INUM (GPDI), INT2)
If (LEqual (TPDM, Zero))
{
SHPO (GPDI, One)
}
If (LEqual (TPDT, One))
{
Store ("SYNA2393", _HID)
Store (0x20, HID2)
Return (Zero)
}
If (LEqual (TPDT, 0x02))
{
Store ("06CB2846", _HID)
Store (0x20, HID2)
Return (Zero)
}
If (LEqual (TPDT, 0x06))
{
Store ("ALPS0000", _HID)
Store (0x20, HID2)
Store (0x2C, BADR)
Return (Zero)
}
If (LEqual (TPDT, 0x05))
{
Store (GTID (One), _HID)
Store (TPDH, HID2)
Switch (CBID)
{
Case (0x08BC)
{
Store (0x15, BADR)
}
Case (0x08BD)
{
Store (TPDB, BADR)
}
Case (0x08C0)
{
Store (TPDB, BADR)
}
Default
{
Store (TPDB, BADR)
}
}
If (LEqual (TPDS, Zero))
{
Store (0x000186A0, SPED)
}
If (LEqual (TPDS, One))
{
Store (0x00061A80, SPED)
}
If (LEqual (TPDS, 0x02))
{
Store (0x000F4240, SPED)
}
Return (Zero)
}
}
Name (_HID, "XXXX0000") // _HID: Hardware ID
Name (_CID, "PNP0C50") // _CID: Compatible ID
Name (_S0W, 0x03) // _S0W: S0 Device Wake State
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
If (LEqual (Arg0, HIDG))
{
Return (HIDD (Arg0, Arg1, Arg2, Arg3, HID2))
}
If (LEqual (Arg0, TP7G))
{
Return (TP7D (Arg0, Arg1, Arg2, Arg3, SBFB, SBFG))
}
Return (Buffer (One)
{
0x00
})
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
If (LAnd (LNotEqual (TPDT, Zero), And (I2CN, One)))
{
Return (0x0F)
}
Return (Zero)
}
Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
{
If (LLess (OSYS, 0x07DC))
{
Return (SBFI)
}
If (LEqual (TPDM, Zero))
{
Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFG))
}
Return (ConcatenateResTemplate (I2CM (I2CX, BADR, SPED), SBFI))
}
}