Fix some warnings about missing return values
[Teclast-X98-Air-3G_C6J6_custom_DSDT.git] / dsdt.dsl
index fd80b31..3fcf1b8 100644 (file)
--- a/dsdt.dsl
+++ b/dsdt.dsl
@@ -3745,22 +3745,23 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                     Return (Zero)
                 }
 
-                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
+                Name (RBUF, ResourceTemplate ()
                 {
-                    Name (RBUF, ResourceTemplate ()
+                    Memory32Fixed (ReadWrite,
+                        0xDF498000,         // Address Base
+                        0x00001000,         // Address Length
+                        _Y07)
+                    Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
                     {
-                        Memory32Fixed (ReadWrite,
-                            0xDF498000,         // Address Base
-                            0x00001000,         // Address Length
-                            _Y07)
-                        Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
-                        {
-                            0x00000018,
-                        }
-                    })
-                    CreateDWordField (RBUF, \_SB.LPEA.ADMA._CRS._Y07._BAS, B0BA)  // _BAS: Base Address
+                        0x00000018,
+                    }
+                })
+
+                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
+                {
+                    CreateDWordField (RBUF, \_SB.LPEA.ADMA._Y07._BAS, B0BA)  // _BAS: Base Address
                     B0BA = LPE0 /* \LPE0 */
-                    Return (RBUF) /* \_SB_.LPEA.ADMA._CRS.RBUF */
+                    Return (RBUF) /* \_SB_.LPEA.ADMA.RBUF */
                 }
             }
 
@@ -3781,27 +3782,28 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                     Return (Zero)
                 }
 
-                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
+                Name (RBUF, ResourceTemplate ()
                 {
-                    Name (RBUF, ResourceTemplate ()
+                    Memory32Fixed (ReadWrite,
+                        0xDF4A1000,         // Address Base
+                        0x00001000,         // Address Length
+                        _Y08)
+                    Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
                     {
-                        Memory32Fixed (ReadWrite,
-                            0xDF4A1000,         // Address Base
-                            0x00001000,         // Address Length
-                            _Y08)
-                        Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, ,, )
-                        {
-                            0x0000001B,
-                        }
-                    })
-                    CreateDWordField (RBUF, \_SB.LPEA.SSP1._CRS._Y08._BAS, B0BA)  // _BAS: Base Address
+                        0x0000001B,
+                    }
+                })
+
+                Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
+                {
+                    CreateDWordField (RBUF, \_SB.LPEA.SSP1._Y08._BAS, B0BA)  // _BAS: Base Address
                     B0BA = (LPE0 + 0x000A1000)
-                    Return (RBUF) /* \_SB_.LPEA.SSP1._CRS.RBUF */
+                    Return (RBUF) /* \_SB_.LPEA.SSP1.RBUF */
                 }
 
                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                     If ((Arg0 == ToUUID ("886a3f26-600c-4401-b7b1-01e9c2e7e77e")))
                     {
                         Return ("BLUET")
@@ -3821,8 +3823,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                     {
                         While (One)
                         {
-                            _T_0 = ToInteger (Arg1)
-                            If ((_T_0 == 0x08))
+                            T_0 = ToInteger (Arg1)
+                            If ((T_0 == 0x08))
                             {
                                 Return (Buffer (0x05)
                                 {
@@ -3831,7 +3833,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                             }
                             Else
                             {
-                                If ((_T_0 == 0x10))
+                                If ((T_0 == 0x10))
                                 {
                                     Return (Buffer (0x05)
                                     {
@@ -3840,7 +3842,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                 }
                                 Else
                                 {
-                                    If ((_T_0 == 0x30))
+                                    If ((T_0 == 0x30))
                                     {
                                         Return (Buffer (0x05)
                                         {
@@ -4273,6 +4275,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                 PDBM &= 0xFFFFFFFFFFFFFFFD
                 MEMB = Local2
                 PDBM = Local1
+
+                Return (Zero)
             }
 
             Method (_PS3, 0, Serialized)  // _PS3: Power State 3
@@ -4346,6 +4350,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                 PDBM &= 0xFFFFFFFFFFFFFFFD
                 MEMB = Local2
                 PDBM = Local1
+
+                Return (Zero)
             }
 
             Method (_DSW, 3, NotSerialized)  // _DSW: Device Sleep Wake
@@ -5274,13 +5280,13 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                         })
                         Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                         {
-                            Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                            Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                             If ((Arg0 == ToUUID ("a5fc708f-8775-4ba6-bd0c-ba90a1ec72f8")))
                             {
                                 While (One)
                                 {
-                                    _T_0 = ToInteger (Arg2)
-                                    If ((_T_0 == Zero))
+                                    T_0 = ToInteger (Arg2)
+                                    If ((T_0 == Zero))
                                     {
                                         If ((Arg1 == One))
                                         {
@@ -5299,7 +5305,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                     }
                                     Else
                                     {
-                                        If ((_T_0 == One))
+                                        If ((T_0 == One))
                                         {
                                             If ((SDGV == 0xFF))
                                             {
@@ -5312,7 +5318,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                         }
                                         Else
                                         {
-                                            If ((_T_0 == 0x02))
+                                            If ((T_0 == 0x02))
                                             {
                                                 Return (SDGV) /* \SDGV */
                                             }
@@ -5371,13 +5377,13 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                         })
                         Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                         {
-                            Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                            Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                             If ((Arg0 == ToUUID ("a5fc708f-8775-4ba6-bd0c-ba90a1ec72f8")))
                             {
                                 While (One)
                                 {
-                                    _T_0 = ToInteger (Arg2)
-                                    If ((_T_0 == Zero))
+                                    T_0 = ToInteger (Arg2)
+                                    If ((T_0 == Zero))
                                     {
                                         If ((Arg1 == One))
                                         {
@@ -5396,7 +5402,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                     }
                                     Else
                                     {
-                                        If ((_T_0 == One))
+                                        If ((T_0 == One))
                                         {
                                             If ((SDGV == 0xFF))
                                             {
@@ -5409,7 +5415,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                         }
                                         Else
                                         {
-                                            If ((_T_0 == 0x02))
+                                            If ((T_0 == 0x02))
                                             {
                                                 Return (SDGV) /* \SDGV */
                                             }
@@ -5468,13 +5474,13 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                         })
                         Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                         {
-                            Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                            Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                             If ((Arg0 == ToUUID ("a5fc708f-8775-4ba6-bd0c-ba90a1ec72f8")))
                             {
                                 While (One)
                                 {
-                                    _T_0 = ToInteger (Arg2)
-                                    If ((_T_0 == Zero))
+                                    T_0 = ToInteger (Arg2)
+                                    If ((T_0 == Zero))
                                     {
                                         If ((Arg1 == One))
                                         {
@@ -5493,7 +5499,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                     }
                                     Else
                                     {
-                                        If ((_T_0 == One))
+                                        If ((T_0 == One))
                                         {
                                             If ((SDGV == 0xFF))
                                             {
@@ -5506,7 +5512,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                         }
                                         Else
                                         {
-                                            If ((_T_0 == 0x02))
+                                            If ((T_0 == 0x02))
                                             {
                                                 Return (SDGV) /* \SDGV */
                                             }
@@ -5565,13 +5571,13 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                         })
                         Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                         {
-                            Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                            Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                             If ((Arg0 == ToUUID ("a5fc708f-8775-4ba6-bd0c-ba90a1ec72f8")))
                             {
                                 While (One)
                                 {
-                                    _T_0 = ToInteger (Arg2)
-                                    If ((_T_0 == Zero))
+                                    T_0 = ToInteger (Arg2)
+                                    If ((T_0 == Zero))
                                     {
                                         If ((Arg1 == One))
                                         {
@@ -5590,7 +5596,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                     }
                                     Else
                                     {
-                                        If ((_T_0 == One))
+                                        If ((T_0 == One))
                                         {
                                             If ((SDGV == 0xFF))
                                             {
@@ -5603,7 +5609,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                                         }
                                         Else
                                         {
-                                            If ((_T_0 == 0x02))
+                                            If ((T_0 == 0x02))
                                             {
                                                 Return (SDGV) /* \SDGV */
                                             }
@@ -6404,21 +6410,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
             Method (_AEI, 0, NotSerialized)  // _AEI: ACPI Event Interrupts
             {
-                Name (RBUF, ResourceTemplate ()
-                {
-                    GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullUp, 0x0000,
-                        "\\_SB.GPO2", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0012
-                        }
-                    GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullUp, 0x0000,
-                        "\\_SB.GPO2", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0002
-                        }
-                })
                 Name (FBUF, ResourceTemplate ()
                 {
                     GpioInt (Edge, ActiveBoth, SharedAndWake, PullUp, 0x0000,
@@ -9889,26 +9880,25 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Name (_T_1, Zero)  // _T_x: Emitted by ASL Compiler
-                    Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_1, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                     If ((Arg0 == ToUUID ("a9240c44-f032-454d-80e5-7aeed80e9551")))
                     {
-                        CreateByteField (Arg3, Zero, FARG)
                         While (One)
                         {
-                            _T_0 = Arg2
-                            If ((_T_0 == 0x03))
+                            T_0 = Arg2
+                            If ((T_0 == 0x03))
                             {
                                 While (One)
                                 {
-                                    _T_1 = Arg3
-                                    If ((_T_1 == Zero))
+                                    T_1 = Arg3
+                                    If ((T_1 == Zero))
                                     {
                                         Return (0x11)
                                     }
                                     Else
                                     {
-                                        If ((_T_1 == 0x04))
+                                        If ((T_1 == 0x04))
                                         {
                                             Return (Buffer (0x34)
                                             {
@@ -11413,20 +11403,20 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Name (_T_1, Zero)  // _T_x: Emitted by ASL Compiler
-                    Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_1, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                     Debug = "Method _DSM begin"
                     If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
                     {
                         While (One)
                         {
-                            _T_0 = ToInteger (Arg2)
-                            If ((_T_0 == Zero))
+                            T_0 = ToInteger (Arg2)
+                            If ((T_0 == Zero))
                             {
                                 While (One)
                                 {
-                                    _T_1 = ToInteger (Arg1)
-                                    If ((_T_1 == One))
+                                    T_1 = ToInteger (Arg1)
+                                    If ((T_1 == One))
                                     {
                                         Debug = "Method _DSM Function Query"
                                         Return (Buffer (One)
@@ -11447,7 +11437,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                             }
                             Else
                             {
-                                If ((_T_0 == One))
+                                If ((T_0 == One))
                                 {
                                     Debug = "Method _DSM Function HID"
                                     Return (Zero)
@@ -12090,20 +12080,20 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Name (_T_1, Zero)  // _T_x: Emitted by ASL Compiler
-                    Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_1, Zero)  // _T_x: Emitted by ASL Compiler
+                    Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                     Debug = "Method _DSM begin"
                     If ((Arg0 == ToUUID ("3cdff6f7-4267-4555-ad05-b30a3d8938de") /* HID I2C Device */))
                     {
                         While (One)
                         {
-                            _T_0 = ToInteger (Arg2)
-                            If ((_T_0 == Zero))
+                            T_0 = ToInteger (Arg2)
+                            If ((T_0 == Zero))
                             {
                                 While (One)
                                 {
-                                    _T_1 = ToInteger (Arg1)
-                                    If ((_T_1 == One))
+                                    T_1 = ToInteger (Arg1)
+                                    If ((T_1 == One))
                                     {
                                         Debug = "Method _DSM Function Query"
                                         Return (Buffer (One)
@@ -12124,7 +12114,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                             }
                             Else
                             {
-                                If ((_T_0 == One))
+                                If ((T_0 == One))
                                 {
                                     Debug = "Method _DSM Function HID"
                                     Return (Zero)
@@ -12230,6 +12220,8 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
                 PSAT |= 0x03
                 Local0 = PSAT /* \_SB_.I2C5.PSAT */
+
+                Return (Zero)
             }
 
             Method (_PS0, 0, NotSerialized)  // _PS0: Power State 0
@@ -14366,39 +14358,6 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                             0x005F
                         }
                 })
-                Name (RBU0, ResourceTemplate ()
-                {
-                    GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullDefault, 0x0000,
-                        "\\_SB.GPO2", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0010
-                        }
-                    GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullDefault, 0x0000,
-                        "\\_SB.GPO2", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0015
-                        }
-                    GpioInt (Edge, ActiveBoth, Exclusive, PullDefault, 0x0000,
-                        "\\_SB.GPO0", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0001
-                        }
-                    GpioInt (Edge, ActiveBoth, Exclusive, PullDefault, 0x0000,
-                        "\\_SB.GPO0", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0000
-                        }
-                    GpioInt (Edge, ActiveBoth, Exclusive, PullDefault, 0x0000,
-                        "\\_SB.GPO0", 0x00, ResourceConsumer, ,
-                        )
-                        {   // Pin list
-                            0x0028
-                        }
-                })
                 Name (ABU0, ResourceTemplate ()
                 {
                     GpioInt (Edge, ActiveBoth, ExclusiveAndWake, PullDefault, 0x0000,
@@ -14499,13 +14458,13 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
 
             Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
             {
-                Name (_T_0, Zero)  // _T_x: Emitted by ASL Compiler
+                Name (T_0, Zero)  // _T_x: Emitted by ASL Compiler
                 If ((Arg0 == ToUUID ("dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c") /* Power Button Device */))
                 {
                     While (One)
                     {
-                        _T_0 = ToInteger (Arg2)
-                        If ((_T_0 == Zero))
+                        T_0 = ToInteger (Arg2)
+                        If ((T_0 == Zero))
                         {
                             Return (Buffer (One)
                             {
@@ -14514,7 +14473,7 @@ DefinitionBlock ("dsdt.aml", "DSDT", 2, "ALASKA", "A M I ", 0x00000003)
                         }
                         Else
                         {
-                            If ((_T_0 == One))
+                            If ((T_0 == One))
                             {
                                 Return (0x07)
                             }