-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClevo-P151EMX_battery.txt
57 lines (50 loc) · 2.54 KB
/
Clevo-P151EMX_battery.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#Created by Marco Turi 2016-01-09
#Resources used
#https://github.com/Yuki-Judai/dxxs-DSDT-Patch/blob/master/battery/battery_Clevo_P150HMx.txt
#https://github.com/RehabMan/Laptop-DSDT-Patch/blob/master/battery/battery_Clevo-M860TU.txt
#BDC0
into device label EC code_regex BDC0,\s+16, replace_matched begin BDC0,8,BDC1,8, end;
into method label WMBB code_regex \^\^PCI0.LPCB.EC.BDC0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC.BDC0,^^PCI0.LPCB.EC.BDC1) end;
into method label _BIF code_regex \^\^PCI0.LPCB.EC.BDC0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC.BDC0,^^PCI0.LPCB.EC.BDC1) end;
#BFC0
into device label EC code_regex BFC0,\s+16, replace_matched begin BFC0,8,BFC1,8, end;
into method label WMBB code_regex \^\^PCI0.LPCB.EC.BFC0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC.BFC0,^^PCI0.LPCB.EC.BFC1) end;
into method label _BIF code_regex \^\^PCI0.LPCB.EC.BFC0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC.BFC0,^^PCI0.LPCB.EC.BFC1) end;
#BDV0
into device label EC code_regex BDV0,\s+32, replace_matched begin BDV0,8,BDV1,8,BDV2,8,BDV3,8, end;
into method label _BIF code_regex \^\^PCI0.LPCB.EC.BDV0 replaceall_matched begin B1B4(^^PCI0.LPCB.EC.BDV0,^^PCI0.LPCB.EC.BDV1,^^PCI0.LPCB.EC.BDV2,^^PCI0.LPCB.EC.BDV3) end;
#BRC0
into device label EC code_regex BRC0,\s+16, replace_matched begin BRC0,8,BRC1,8, end;
into method label _BST code_regex \^\^PCI0.LPCB.EC.BRC0 replaceall_matched begin B1B2(^^PCI0.LPCB.EC.BRC0,^^PCI0.LPCB.EC.BRC1) end;
#OEM3
into device label EC code_regex OEM3,\s+16 replace_matched begin OE30,8,OE31,8 end;
into method label CPTS code_regex \^LPCB.EC.OEM3 replaceall_matched begin B1B2(^LPCB.EC.OE30,^LPCB.EC.OE31) end;
into method label CWAK code_regex \^LPCB.EC.OEM3 replaceall_matched begin B1B2(^LPCB.EC.OE30,^LPCB.EC.OE31) end;
# ==== Data handling methods ====
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized)\n
{\n
Return(Or(Arg0, ShiftLeft(Arg1, 8)))\n
}\n
end;
into method label B1B4 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B4, 4, NotSerialized)\n
{\n
Store(Arg3, Local0)\n
Or(Arg2, ShiftLeft(Local0, 8), Local0)\n
Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
Return(Local0)\n
}\n
end;
# WMI remove patch
into device label WMI remove_entry;
into device label WMI0 remove_entry;
into device label WMI1 remove_entry;
into_all method code_regex Notify\s+\(WMI,.*\) removeall_matched;
into_all method code_regex Add\s+\(.*WMI\.EVNT\) removeall_matched;
into_all method code_regex Store\s+\(.*WMI\.EVNT\) removeall_matched;