Contribute
Register

Can't compile DSDT with battery patch. Help needed

Joined
Sep 27, 2017
Messages
14
Motherboard
Lenovo Yoga 720 12-ikb ()
CPU
i5-7200U
Graphics
HD 620 (1920x1080)
Mac
MacBook Air
Classic Mac
iBook
Mobile Phone
iOS
Hi:

I've followed the Rehabman guide to create a battery patch for my Lenovo Yoga 720 12ikb. Patch is ready, but I can't compile the DSDT with this patch. That's the error: Invalid type (Target is [Package], Source must be a package also.

And here the lines with the error (in bold):

Rich (BB code):
                Method (MHPF, 1, NotSerialized)
                {
                    If (LAnd (LEqual (^^^^XHC.PMEE, One), LEqual (OSVR, 0x10)))
                    {
                        Store (Zero, ^^^^XHC.PMEE)
                    }

                    If (LEqual (Acquire (MUEC, 0xA000), Zero))
                    {
                        If (ECAV)
                        {
                            Store (One, HSMG)
                            CreateWordField (Arg0, 0x04, DAT0)
                            CreateWordField (Arg0, 0x06, DAT2)
                            CreateDWordField (Arg0, 0x08, DAT4)
                            CreateDWordField (Arg0, 0x0C, DAT5)
                            CreateDWordField (Arg0, 0x10, DAT6)
                            CreateDWordField (Arg0, 0x14, DAT7)
                            CreateDWordField (Arg0, 0x18, DAT8)
                            CreateDWordField (Arg0, 0x1C, DAT9)
                            CreateDWordField (Arg0, 0x20, DATA)
                            CreateByteField (Arg0, 0x24, CONT)
                            CreateByteField (Arg0, One, STAT)
                            CreateByteField (Arg0, 0x03, ACMD)
                            CreateByteField (Arg0, 0x02, AADR)
                            CreateByteField (Arg0, Zero, APTC)
                            Store (DAT0, B1B2(SDA0,SDA1))
                            Store (DAT2, B1B2(DA20,DA21))
                            Store (DAT4, B1B4(DA40,DA41,DA42,DA43))
                            Store (DAT5, B1B4(DA50,DA51,DA52,DA53))
                            Store (DAT6, B1B4(DA60,DA61,DA62,DA63))
                            Store (DAT7, B1B4(DA70,DA71,DA72,DA73))
                            Store (DAT8, B1B4(DA80,DA81,DA82,DA83))
                            Store (DAT9, B1B4(DA90,DA91,DA92,DA93))
                            Store (DATA, B1B4(DAA0,DAA1,DAA2,DAA3))
                            Store (CONT, SBCT)
                            Store (ACMD, SCMD)
                            If (LEqual (ACMD, 0x37))
                            {
                                Sleep (0x01F4)
                            }...
I can only bypass this error converting this lines as a comment (with "//"). Then, in this case, the DSDT runs quite well (bat icon and % appears, trackpad with a lot of gestures, I can manage energy saver configuration...), but, as is logical, sleep doesn't work and reboots the machine.

I attach battery patch, and DSDT'S (with and without bat patch applied). The problem is in lines 18828-18834 in the bat-patched DSDT.

thanks for your help!
 

Attachments

Top