UPSTREAM: google/chromeec: Ensure \_SB.LID0 is present before using it
Since we want to support devices that do not have a lid but still use
EC, we need to conditionally check if referencing \_SB.LID0 is valid.
BUG=b:35775024
CQ-DEPEND=CL:459510
Change-Id: I11b9bca59355caa266b27322da90dde2f9aa00a5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 219daafa8f
Original-Change-Id: I92433460ec870fb07f48e67a6dfc61e3c036a129
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18941
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Ignore-CL-Reviewed-on: https://review.coreboot.org/17271
Ignore-CL-Reviewed-on: https://review.coreboot.org/17346
Ignore-CL-Reviewed-on: https://review.coreboot.org/18041
Ignore-CL-Reviewed-on: https://review.coreboot.org/18814
Ignore-CL-Reviewed-on: https://review.coreboot.org/18953
Reviewed-on: https://chromium-review.googlesource.com/458636
This commit is contained in:
parent
67be62a90b
commit
4adf85982f
1 changed files with 9 additions and 2 deletions
|
|
@ -26,6 +26,9 @@ External (\_SB.DPTF.TEVT, MethodObj)
|
|||
External (\_SB.DPTF.TCHG, DeviceObj)
|
||||
#endif
|
||||
External (\_SB.DPTF.TPET, MethodObj)
|
||||
#ifndef EC_ENABLE_LID_SWITCH
|
||||
External (\_SB.LID0, DeviceObj)
|
||||
#endif
|
||||
|
||||
Device (EC0)
|
||||
{
|
||||
|
|
@ -169,7 +172,9 @@ Device (EC0)
|
|||
#ifdef EC_ENABLE_LID_SWITCH
|
||||
Notify (LID0, 0x80)
|
||||
#else
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
If (CondRefOf (\_SB.LID0)) {
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -181,7 +186,9 @@ Device (EC0)
|
|||
#ifdef EC_ENABLE_LID_SWITCH
|
||||
Notify (LID0, 0x80)
|
||||
#else
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
If (CondRefOf (\_SB.LID0)) {
|
||||
Notify (\_SB.LID0, 0x80)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue