Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Keyboard Backlight work again. #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/ec/lenovo/h8/acpi/ec.asl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Device(EC)
HSPA, 1,
Offset (0x0C),
LEDS, 8, /* LED state */
Offset (0x0d),
, 4,
, 2,
KBLS, 2, /* Keyboard Light */
Offset (0x0F),
, 7,
TBSW, 1, /* Tablet mode switch */
Expand All @@ -42,7 +46,7 @@ Device(EC)
WWEB, 1,
Offset (0x3B),
, 1,
KBLT, 1, /* Keyboard Light */
KBLT, 1, /* Think Light?? */
, 2,
USPW, 1, /* USB Power enable */
Offset (0x48),
Expand Down Expand Up @@ -116,9 +120,9 @@ Device(EC)
Store(Arg0, USPW)
}

Method (LGHT, 1, NotSerialized)
Method (LGHT, 1, NotSerialized) // method for thinklight?
{
Store(Arg0, KBLT)
Store(Arg0, TPLT)
}


Expand Down
17 changes: 10 additions & 7 deletions src/ec/lenovo/h8/acpi/thinkpad.asl
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ Device (HKEY)
* Bit 9: Backlight HW present
* Bit 0-1: Brightness level
*/
Method (MLCG, 1)
Method (MLCG, 0)
{
If (HKBL) {
Store (0x200, Local0)
/* FIXME: Support 2bit brightness control */
Or (Local0, \_SB.PCI0.LPCB.EC.KBLT, Local0)
/* FIXME: Support windows and events */
Store ( Or (Local0, \_SB.PCI0.LPCB.EC.KBLS), Local0)
Return (Local0)
} Else {
Return (0)
}
}
}

/*
Expand All @@ -257,9 +257,12 @@ Device (HKEY)
Method (MLCS, 1)
{
If (HKBL) {
/* FIXME: Support 2bit brightness control */
Store (And(Arg0, 1), \_SB.PCI0.LPCB.EC.WWEB)
}
/* FIXME: windows and events */
Store (Arg0, \_SB.PCI0.LPCB.EC.KBLS)
return (Or (0x200, Arg0) //Return per ACPI.
} Else {
Return (0)
}
}

/*
Expand Down