Skip to content

Instantly share code, notes, and snippets.

@Leo1003
Last active November 27, 2019 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leo1003/f99084090414d5b0ab1d541870efac26 to your computer and use it in GitHub Desktop.
Save Leo1003/f99084090414d5b0ab1d541870efac26 to your computer and use it in GitHub Desktop.
Method (_ON, 0, Serialized) // _ON_: Power On
{
If ((OSYS >= 0x07DC))
{
\_SB.PCI0.PGON (Zero)
If ((GPRF != One))
{
VREG = VGAB /* \_SB_.PCI0.PEG0.PEGP.VGAB */
}
}
Return (Zero)
}
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
If ((OSYS >= 0x07DC))
{
If ((GPRF != One))
{
VGAB = VREG /* \_SB_.PCI0.PEG0.PEGP.VREG */
}
\_SB.PCI0.PGOF (Zero)
}
Return (Zero)
}
Method (_ON, 0, Serialized) // _ON_: Power On
{
\_SB.PCI0.PGON (Zero)
Notify (\_SB.PCI0.PEG0, Zero) // Bus Check
}
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
\_SB.PCI0.PGOF (Zero)
Notify (\_SB.PCI0.PEG0, Zero) // Bus Check
}
DefinitionBlock ("", "SSDT", 0, "LEO", "Linux ", 0x00001001)
{
External (_SB_.PCI0.PEG0, DeviceObj)
External (_SB_.PCI0.PEG0.PEGP, DeviceObj)
External (_SB_.PCI0.PEG0.PEGP.GPRF, IntObj)
External (_SB_.PCI0.PEG0.PEGP.VREG, FieldUnitObj)
External (_SB_.PCI0.PEG0.PEGP.VGAB, BuffObj)
External (_SB_.PCI0.PGOF, MethodObj) // 1 Arguments
External (_SB_.PCI0.PGON, MethodObj) // 1 Arguments
External (OSYS, IntObj)
Scope (\_SB.PCI0.PEG0.PEGP)
{
Method (_ON, 0, Serialized) // _ON_: Power On
{
Store("----Custom Card Power ON----", Debug)
If ((OSYS >= 0x07DC))
{
\_SB.PCI0.PGON (Zero)
Notify (\_SB.PCI0.PEG0, Zero) // Add from SSDT16
If ((GPRF != One))
{
VREG = VGAB /* \_SB_.PCI0.PEG0.PEGP.VGAB */
}
}
Return (Zero)
}
Method (_OFF, 0, Serialized) // _OFF: Power Off
{
Store("----Custom Card Power OFF----", Debug)
If ((OSYS >= 0x07DC))
{
If ((GPRF != One))
{
VGAB = VREG /* \_SB_.PCI0.PEG0.PEGP.VREG */
}
\_SB.PCI0.PGOF (Zero)
Notify (\_SB.PCI0.PEG0, Zero) // Add from SSDT16
}
Return (Zero)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment