diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/intel/kunimitsu/chromeos.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mainboard/intel/kunimitsu/chromeos.c b/src/mainboard/intel/kunimitsu/chromeos.c index 66be521f46..d2cfeb76fd 100644 --- a/src/mainboard/intel/kunimitsu/chromeos.c +++ b/src/mainboard/intel/kunimitsu/chromeos.c @@ -23,6 +23,7 @@ #include <device/device.h> #include <device/pci.h> #include <ec/google/chromeec/ec.h> +#include <gpio.h> #include <soc/gpio.h> #include <string.h> #include <vendorcode/google/chromeos/chromeos.h> @@ -57,13 +58,13 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_lid_switch(void) { - /* Default to force open */ - return 1; + /* Read lid switch state from the EC. */ + return !!(google_chromeec_get_switches() & EC_SWITCH_LID_OPEN); } -/* The dev-switch is virtual */ int get_developer_mode_switch(void) { + /* No physical developer mode switch. */ return 0; } @@ -87,5 +88,6 @@ int clear_recovery_mode_switch(void) int get_write_protect_state(void) { - return 0; + /* Read PCH_WP GPIO. */ + return gpio_get(GPIO_PCH_WP); } |