Skip to content

Commit a9152e5

Browse files
wiktormowinskimkopec
authored andcommitted
ec/s76/ec/acpi/battery.asl: Pass battery status directly from EC
Get the battery status directly from EC without redundant logic in ACPI. Signed-off-by: Wiktor Mowinski <wiktor.mowinski@3mdeb.com> Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
1 parent b5b5e03 commit a9152e5

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/ec/system76/ec/acpi/battery.asl

+2-16
Original file line numberDiff line numberDiff line change
@@ -193,22 +193,8 @@ Device (BAT0)
193193
{
194194
If (^^PCI0.LPCB.EC0.BAT0)
195195
{
196-
Local0 = 0
197-
Local1 = 0
198-
If (^^AC.ACFG)
199-
{
200-
If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02))
201-
{
202-
Local0 |= 0x02
203-
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
204-
}
205-
}
206-
Else
207-
{
208-
Local0 |= 1
209-
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
210-
}
211-
196+
Local0 = ^^PCI0.LPCB.EC0.BST0
197+
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
212198
Local7 = (Local1 & 0x8000)
213199
If ((Local7 == 0x8000))
214200
{

0 commit comments

Comments
 (0)