ec/google/chromeec: Use either EC or MB lid switch state

With CB:16732, EC can provide default lid switch implementation(LID0
ACPI device). Up until that point, mainboard has been providing default
switch implementation. When EC provides lid switch implementation, the
lid switch state is read from EC either through MMAP or LPC interface.
Hence there is no need to keep mainboard's LIDS ACPI object in sync with
EC's lid switch state. Use only EC's lid switch state on boards using
EC's implementation. This paves the way to remove LIDS ACPI object on
those mainboards.

BUG=None
TEST=Build Skyrim BIOS image and boot to OS. Trigger lid open/close
events and ensure that they are detected properly through
/proc/acpi/button/lid/LID0/state.
localhost ~ # cat /proc/acpi/button/lid/LID0/state
state:      open
localhost ~ # cat /proc/acpi/button/lid/LID0/state
state:      closed

Ensure that the system behaves as expected based on powerd
configuration. After signin, system suspends/resumes for lid close/open.
On signin screen, system shuts down/boots for lid close/open.

Change-Id: I013574d7c21761f167ad38aeed27a419677b8000
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 8109eb3..3d5961a 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -177,8 +177,10 @@
 		 */
 		\PNOT ()
 
+#ifndef EC_ENABLE_LID_SWITCH
 		// Initialize LID switch state
 		\LIDS = LIDS
+#endif
 
 #if CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC)
 		/*
@@ -234,9 +236,10 @@
 			\_SB.DPTC()
 		}
 #endif
-		\LIDS = LIDS
 #ifdef EC_ENABLE_LID_SWITCH
 		Notify (LID0, 0x80)
+#else
+		\LIDS = LIDS
 #endif
 	}
 
@@ -249,10 +252,11 @@
 			\_SB.DPTC()
 		}
 #endif
-		\LIDS = LIDS
 		Notify (CREC, 0x2)
 #ifdef EC_ENABLE_LID_SWITCH
 		Notify (LID0, 0x80)
+#else
+		\LIDS = LIDS
 #endif
 	}