UPSTREAM: ec/google/chromeec: provide optional ASL lid switch implementation
Instead of relying on the mainboards to provide their own LID0 ACPI device, provide the infrastructure so that the mainboards can signal to the EC ASL code to provide the default lid switch implementation. BUG=chrome-os-partner:56677 BRANCH=None TEST=None Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/16732 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) Change-Id: Ie43b1c4f8522db1245f1f479bfdb685d3066121d Reviewed-on: https://chromium-review.googlesource.com/390397 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
2ada5f21fc
commit
093b5dc992
1 changed files with 24 additions and 0 deletions
|
|
@ -68,6 +68,22 @@ Device (EC0)
|
|||
#include "emem.asl"
|
||||
}
|
||||
|
||||
#ifdef EC_ENABLE_LID_SWITCH
|
||||
/* LID Switch */
|
||||
Device (LID0)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0C0D"))
|
||||
Method (_LID, 0)
|
||||
{
|
||||
Return (^^LIDS)
|
||||
}
|
||||
|
||||
#ifdef EC_ENABLE_WAKE_PIN
|
||||
Name (_PRW, Package () { EC_ENABLE_WAKE_PIN, 0x5 })
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Method (TINS, 1, Serialized)
|
||||
{
|
||||
Switch (ToInteger (Arg0))
|
||||
|
|
@ -150,7 +166,11 @@ Device (EC0)
|
|||
{
|
||||
Store ("EC: LID CLOSE", Debug)
|
||||
Store (LIDS, \LIDS)
|
||||
#ifdef EC_ENABLE_LID_SWITCH
|
||||
Notify (LID0, 0x80)
|
||||
#else
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Lid Open Event
|
||||
|
|
@ -158,7 +178,11 @@ Device (EC0)
|
|||
{
|
||||
Store ("EC: LID OPEN", Debug)
|
||||
Store (LIDS, \LIDS)
|
||||
#ifdef EC_ENABLE_LID_SWITCH
|
||||
Notify (LID0, 0x80)
|
||||
#else
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
#endif
|
||||
}
|
||||
|
||||
// Power Button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue