ec/purism/librem-ec/acpi: Use Printf() for debug prints
Change-Id: Ic26c24d1246f8a40191e02229e66f6a893e488fa Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60382 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
e0625f8c8b
commit
dcebf6c791
|
@ -34,7 +34,7 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
Name (ECOK, Zero)
|
Name (ECOK, Zero)
|
||||||
Method (_REG, 2, Serialized) // _REG: Region Availability
|
Method (_REG, 2, Serialized) // _REG: Region Availability
|
||||||
{
|
{
|
||||||
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
|
Printf ("EC: _REG %o %o", ToHexString(Arg0), ToHexString(Arg1))
|
||||||
If ((Arg0 == 0x03) && (Arg1 == One)) {
|
If ((Arg0 == 0x03) && (Arg1 == One)) {
|
||||||
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
|
||||||
ECOS = 1
|
ECOS = 1
|
||||||
|
@ -63,7 +63,7 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (PTS, 1, Serialized) {
|
Method (PTS, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
|
Printf ("EC: PTS: %o", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Clear wake cause
|
// Clear wake cause
|
||||||
WFNO = Zero
|
WFNO = Zero
|
||||||
|
@ -71,7 +71,7 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (WAK, 1, Serialized) {
|
Method (WAK, 1, Serialized) {
|
||||||
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
|
Printf ("EC: WAK: %o", ToHexString(Arg0))
|
||||||
If (ECOK) {
|
If (ECOK) {
|
||||||
// Set current AC state
|
// Set current AC state
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
|
@ -91,42 +91,42 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
Method (_Q0A, 0, NotSerialized) // Touchpad Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Touchpad Toggle"
|
Printf ("EC: Touchpad Toggle")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
Method (_Q0B, 0, NotSerialized) // Screen Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Screen Toggle"
|
Printf ("EC: Screen Toggle")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0C, 0, NotSerialized) // Mute
|
Method (_Q0C, 0, NotSerialized) // Mute
|
||||||
{
|
{
|
||||||
Debug = "EC: Mute"
|
Printf ("EC: Mute")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
Method (_Q0D, 0, NotSerialized) // Keyboard Backlight
|
||||||
{
|
{
|
||||||
Debug = "EC: Keyboard Backlight"
|
Printf ("EC: Keyboard Backlight")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0E, 0, NotSerialized) // Volume Down
|
Method (_Q0E, 0, NotSerialized) // Volume Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Down"
|
Printf ("EC: Volume Down")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q0F, 0, NotSerialized) // Volume Up
|
Method (_Q0F, 0, NotSerialized) // Volume Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Volume Up"
|
Printf ("EC: Volume Up")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
Method (_Q10, 0, NotSerialized) // Switch Video Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Switch Video Mode"
|
Printf ("EC: Switch Video Mode")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q11, 0, NotSerialized) // Brightness Down
|
Method (_Q11, 0, NotSerialized) // Brightness Down
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Down"
|
Printf ("EC: Brightness Down")
|
||||||
if (^^^^HIDD.HRDY) {
|
if (^^^^HIDD.HRDY) {
|
||||||
^^^^HIDD.HPEM (20)
|
^^^^HIDD.HPEM (20)
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q12, 0, NotSerialized) // Brightness Up
|
Method (_Q12, 0, NotSerialized) // Brightness Up
|
||||||
{
|
{
|
||||||
Debug = "EC: Brightness Up"
|
Printf ("EC: Brightness Up")
|
||||||
if (^^^^HIDD.HRDY) {
|
if (^^^^HIDD.HRDY) {
|
||||||
^^^^HIDD.HPEM (19)
|
^^^^HIDD.HPEM (19)
|
||||||
}
|
}
|
||||||
|
@ -142,12 +142,12 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
Method (_Q13, 0, NotSerialized) // Camera Toggle
|
||||||
{
|
{
|
||||||
Debug = "EC: Camera Toggle"
|
Printf ("EC: Camera Toggle")
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
Method (_Q14, 0, NotSerialized) // Airplane Mode
|
||||||
{
|
{
|
||||||
Debug = "EC: Airplane Mode"
|
Printf ("EC: Airplane Mode")
|
||||||
if (^^^^HIDD.HRDY) {
|
if (^^^^HIDD.HRDY) {
|
||||||
^^^^HIDD.HPEM (8)
|
^^^^HIDD.HPEM (8)
|
||||||
}
|
}
|
||||||
|
@ -156,13 +156,13 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q15, 0, NotSerialized) // Suspend Button
|
Method (_Q15, 0, NotSerialized) // Suspend Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Suspend Button"
|
Printf ("EC: Suspend Button")
|
||||||
Notify (SLPB, 0x80)
|
Notify (SLPB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q16, 0, NotSerialized) // AC Detect
|
Method (_Q16, 0, NotSerialized) // AC Detect
|
||||||
{
|
{
|
||||||
Debug = "EC: AC Detect"
|
Printf ("EC: AC Detect")
|
||||||
^^^^AC.ACFG = ADP
|
^^^^AC.ACFG = ADP
|
||||||
Notify (AC, 0x80) // Status Change
|
Notify (AC, 0x80) // Status Change
|
||||||
If (BAT0)
|
If (BAT0)
|
||||||
|
@ -174,25 +174,25 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
Method (_Q17, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (17)"
|
Printf ("EC: BAT0 Update (17)")
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
Method (_Q19, 0, NotSerialized) // BAT0 Update
|
||||||
{
|
{
|
||||||
Debug = "EC: BAT0 Update (19)"
|
Printf ("EC: BAT0 Update (19)")
|
||||||
Notify (^^^^BAT0, 0x81) // Information Change
|
Notify (^^^^BAT0, 0x81) // Information Change
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1B, 0, NotSerialized) // Lid Close
|
Method (_Q1B, 0, NotSerialized) // Lid Close
|
||||||
{
|
{
|
||||||
Debug = "EC: Lid Close"
|
Printf ("EC: Lid Close")
|
||||||
Notify (LID0, 0x80)
|
Notify (LID0, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
Method (_Q1C, 0, NotSerialized) // Thermal Trip
|
||||||
{
|
{
|
||||||
Debug = "EC: Thermal Trip"
|
Printf ("EC: Thermal Trip")
|
||||||
/* TODO
|
/* TODO
|
||||||
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
Notify (\_TZ.TZ0, 0x81) // Thermal Trip Point Change
|
||||||
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
Notify (\_TZ.TZ0, 0x80) // Thermal Status Change
|
||||||
|
@ -201,7 +201,7 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
|
|
||||||
Method (_Q1D, 0, NotSerialized) // Power Button
|
Method (_Q1D, 0, NotSerialized) // Power Button
|
||||||
{
|
{
|
||||||
Debug = "EC: Power Button"
|
Printf ("EC: Power Button")
|
||||||
Notify (PWRB, 0x80)
|
Notify (PWRB, 0x80)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,22 +209,22 @@ Device (\_SB.PCI0.LPCB.EC0)
|
||||||
{
|
{
|
||||||
Local0 = OEM4
|
Local0 = OEM4
|
||||||
If (Local0 == 0x8A) {
|
If (Local0 == 0x8A) {
|
||||||
Debug = "EC: White Keyboard Backlight"
|
Printf ("EC: White Keyboard Backlight")
|
||||||
Notify (^^^^LIEC, 0x80)
|
Notify (^^^^LIEC, 0x80)
|
||||||
} ElseIf (Local0 == 0x9F) {
|
} ElseIf (Local0 == 0x9F) {
|
||||||
Debug = "EC: Color Keyboard Toggle"
|
Printf ("EC: Color Keyboard Toggle")
|
||||||
Notify (^^^^LIEC, 0x81)
|
Notify (^^^^LIEC, 0x81)
|
||||||
} ElseIf (Local0 == 0x81) {
|
} ElseIf (Local0 == 0x81) {
|
||||||
Debug = "EC: Color Keyboard Down"
|
Printf ("EC: Color Keyboard Down")
|
||||||
Notify (^^^^LIEC, 0x82)
|
Notify (^^^^LIEC, 0x82)
|
||||||
} ElseIf (Local0 == 0x82) {
|
} ElseIf (Local0 == 0x82) {
|
||||||
Debug = "EC: Color Keyboard Up"
|
Printf ("EC: Color Keyboard Up")
|
||||||
Notify (^^^^LIEC, 0x83)
|
Notify (^^^^LIEC, 0x83)
|
||||||
} ElseIf (Local0 == 0x80) {
|
} ElseIf (Local0 == 0x80) {
|
||||||
Debug = "EC: Color Keyboard Color Change"
|
Printf ("EC: Color Keyboard Color Change")
|
||||||
Notify (^^^^LIEC, 0x84)
|
Notify (^^^^LIEC, 0x84)
|
||||||
} Else {
|
} Else {
|
||||||
Debug = Concatenate("EC: Other: ", ToHexString(Local0))
|
Printf ("EC: Other: %o", ToHexString(Local0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ Device (LIEC) {
|
||||||
Name (_UID, 0)
|
Name (_UID, 0)
|
||||||
|
|
||||||
Method (RSET, 0, Serialized) {
|
Method (RSET, 0, Serialized) {
|
||||||
Debug = "LIEC: RSET"
|
Printf ("LIEC: RSET")
|
||||||
SAPL(0)
|
SAPL(0)
|
||||||
SKBL(0)
|
SKBL(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (INIT, 0, Serialized) {
|
Method (INIT, 0, Serialized) {
|
||||||
Debug = "LIEC: INIT"
|
Printf ("LIEC: INIT")
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use software control
|
// Set flags to use software control
|
||||||
|
@ -29,7 +29,7 @@ Device (LIEC) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (FINI, 0, Serialized) {
|
Method (FINI, 0, Serialized) {
|
||||||
Debug = "LIEC: FINI"
|
Printf ("LIEC: FINI")
|
||||||
RSET()
|
RSET()
|
||||||
If (^^PCI0.LPCB.EC0.ECOK) {
|
If (^^PCI0.LPCB.EC0.ECOK) {
|
||||||
// Set flags to use hardware control
|
// Set flags to use hardware control
|
||||||
|
|
Loading…
Reference in New Issue