Hello Shaunak Saha,
I'd like you to do a code review. Please visit
https://review.coreboot.org/23066
to review the following change.
Change subject: mainboard/glkrvp: Add EC_GOOGLE_CHROMEEC_SWITCHES ......................................................................
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
Signed-off-by: Shaunak Saha shaunak.saha@intel.com Change-Id: Ib454f10a144d600a87d2f69d80d5d46f16c407f8 --- M src/mainboard/intel/glkrvp/Kconfig M src/mainboard/intel/glkrvp/chromeos.c 2 files changed, 3 insertions(+), 27 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/23066/1
diff --git a/src/mainboard/intel/glkrvp/Kconfig b/src/mainboard/intel/glkrvp/Kconfig index dfb53b8..243414b 100644 --- a/src/mainboard/intel/glkrvp/Kconfig +++ b/src/mainboard/intel/glkrvp/Kconfig @@ -43,6 +43,9 @@ select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC select VBOOT_LID_SWITCH
+config VBOOT + select EC_GOOGLE_CHROMEEC_SWITCHES + config MAINBOARD_DIR string default intel/glkrvp diff --git a/src/mainboard/intel/glkrvp/chromeos.c b/src/mainboard/intel/glkrvp/chromeos.c index b7f56ec..a87ce4a 100644 --- a/src/mainboard/intel/glkrvp/chromeos.c +++ b/src/mainboard/intel/glkrvp/chromeos.c @@ -35,39 +35,12 @@ 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;