Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 KB | None | 0 0
  1. Part 1:
  2.  
  3.  
  4.  
  5. Scope (_SB.PCI0.I2C2)
  6. {
  7. Device (CODC)
  8. {
  9. Name (_HID, "193C9890") // _HID: Hardware ID
  10. Name (_DDN, "Maxim 98090 Codec") // _DDN: DOS Device Name
  11. Name (_UID, One) // _UID: Unique ID
  12. Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
  13. {
  14. I2cSerialBusV2 (0x0010, ControllerInitiated, 0x00061A80,
  15. AddressingMode7Bit, "\\_SB.PCI0.I2C2",
  16. 0x00, ResourceConsumer, , Exclusive,
  17. )
  18. Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
  19. {
  20. 0x00000043,
  21. }
  22.  
  23. })
  24.  
  25. Name (GBUF, ResourceTemplate()
  26. {
  27.  
  28. GpioInt (Level, ActiveHigh, Exclusive, PullNone, 0x0000,
  29. "\\_SB.GPSC", 0x00, ResourceConsumer, ,
  30. )
  31. { // Pin list
  32. 0x000E
  33. }
  34. GpioInt (Level, ActiveHigh, Exclusive, PullNone, 0x0000,
  35. "\\_SB.GPSC", 0x00, ResourceConsumer, ,
  36. )
  37. { // Pin list
  38. 0x000F
  39. }
  40. })
  41. Method (_STA, 0, NotSerialized) // _STA: Status
  42. {
  43. If (LEqual (S2EN, One))
  44. {
  45. Return (0x0F)
  46. }
  47. Else
  48. {
  49. Return (Zero)
  50. }
  51. }
  52. }
  53. }
  54.  
  55. Part 2: In LPEA
  56.  
  57. Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
  58. {
  59. CreateDWordField (RBUF, \_SB.PCI0.LPEA._Y16._BAS, BAS0) // _BAS: Base Address
  60. Store (LPB0, BAS0) /* \_SB_.PCI0.LPEA._CRS.BAS0 */
  61. CreateDWordField (RBUF, \_SB.PCI0.LPEA._Y17._BAS, BAS1) // _BAS: Base Address
  62. Store (LPB1, BAS1) /* \_SB_.PCI0.LPEA._CRS.BAS1 */
  63. CreateDWordField (RBUF, \_SB.PCI0.LPEA._Y18._BAS, BAS2) // _BAS: Base Address
  64. Store (LPFW, BAS2) /* \_SB_.PCI0.LPEA._CRS.BAS2 */
  65. If (CondRefOf (\_SB.PCI0.I2C2.CODC.GBUF))
  66. {
  67. ConcatenateResTemplate (RBUF, ^^I2C2.CODC.GBUF, Local1)
  68. Return (Local1)
  69. }
  70.  
  71. Return (RBUF) /* \_SB_.PCI0.LPEA.RBUF */
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement