summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaunak Saha <shaunak.saha@intel.com>2018-01-04 23:14:35 -0800
committerMartin Roth <martinroth@google.com>2018-01-12 18:18:07 +0000
commitf40fd5b5087ee8ab43d94c8e51d042095d597276 (patch)
tree156ac80b93bb2e8057af2c3da002d7851a17ca13
parentf9bd2c505268e514d951bb754df4663fc24c4296 (diff)
mainboard/glkrvp: Add EC_GOOGLE_CHROMEEC_SWITCHES
This patch adds the EC_GOOGLE_CHROMEEC_SWITCHES option so that we use the common switch.c file Change-Id: I93a2ba63015db17989c89ce1b5897de6a93e201f Signed-off-by: Hannah Williams <hannah.williams@intel.com> Reviewed-on: https://review.coreboot.org/23131 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/mainboard/intel/glkrvp/Kconfig1
-rw-r--r--src/mainboard/intel/glkrvp/chromeos.c27
2 files changed, 1 insertions, 27 deletions
diff --git a/src/mainboard/intel/glkrvp/Kconfig b/src/mainboard/intel/glkrvp/Kconfig
index 292da44160..8c71e34490 100644
--- a/src/mainboard/intel/glkrvp/Kconfig
+++ b/src/mainboard/intel/glkrvp/Kconfig
@@ -46,6 +46,7 @@ config CHROMEOS
config VBOOT
select HAS_RECOVERY_MRC_CACHE
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
+ select EC_GOOGLE_CHROMEEC_SWITCHES
config MAINBOARD_DIR
string
diff --git a/src/mainboard/intel/glkrvp/chromeos.c b/src/mainboard/intel/glkrvp/chromeos.c
index b7f56ec53d..a87ce4aa0d 100644
--- a/src/mainboard/intel/glkrvp/chromeos.c
+++ b/src/mainboard/intel/glkrvp/chromeos.c
@@ -35,39 +35,12 @@ void fill_lb_gpios(struct lb_gpios *gpios)
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}
-int get_lid_switch(void)
-{
- if (IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
- /* Read lid switch state from the EC. */
- return !!(google_chromeec_get_switches() & EC_SWITCH_LID_OPEN);
- else
- return 1;
-}
-
int get_developer_mode_switch(void)
{
/* No physical developer mode switch. It's virtual. */
return 0;
}
-int get_recovery_mode_switch(void)
-{
- if (!IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
- return 0;
- /* Check if the EC has posted the keyboard recovery event. */
- return !!(google_chromeec_get_events_b() &
- EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
-}
-
-int clear_recovery_mode_switch(void)
-{
- if (!IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC))
- return 0;
- /* Clear keyboard recovery event. */
- return google_chromeec_clear_events_b(
- EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
-}
-
int get_write_protect_state(void)
{
return 0;