mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
Falco WP is active low, not active high
Read the value of the WP GPIO correctly. BUG=chrome-os-partner:20091 BRANCH=none TEST=manual On the EC console, run gpioget WP_L Short the WP pin, run it again. You should see it change. Change-Id: Id85c1d69c88ea3df4e529e844aa2455643f1a41b Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58948 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
ChromeBot
parent
9bb5c83d6c
commit
89ee180156
@@ -59,7 +59,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
|
||||
x86_power_interrupt},
|
||||
{"RECOVERY_L", LM4_GPIO_A, (1<<5), GPIO_PULL_UP|GPIO_INT_BOTH,
|
||||
switch_interrupt},
|
||||
{"WP", LM4_GPIO_A, (1<<4), GPIO_INT_BOTH,
|
||||
{"WP_L", LM4_GPIO_A, (1<<4), GPIO_INT_BOTH,
|
||||
switch_interrupt},
|
||||
|
||||
/* Other inputs */
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#define CONFIG_PWM_FAN
|
||||
#define CONFIG_TEMP_SENSOR
|
||||
#define CONFIG_USB_PORT_POWER_DUMB
|
||||
#define CONFIG_WP_ACTIVE_HIGH
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
|
||||
@@ -83,7 +82,7 @@ enum gpio_signal {
|
||||
GPIO_VCORE_PGOOD, /* Power good on core VR */
|
||||
GPIO_PCH_EDP_VDD_EN, /* PCH wants EDP enabled */
|
||||
GPIO_RECOVERY_L, /* Recovery signal from servo */
|
||||
GPIO_WP, /* Write protect input */
|
||||
GPIO_WP_L, /* Write protect input */
|
||||
|
||||
/* Other inputs */
|
||||
GPIO_FAN_ALERT_L, /* From thermal sensor */
|
||||
|
||||
@@ -416,7 +416,11 @@ static void switch_init(void)
|
||||
/* Enable interrupts, now that we've initialized */
|
||||
gpio_enable_interrupt(GPIO_POWER_BUTTON_L);
|
||||
gpio_enable_interrupt(GPIO_RECOVERY_L);
|
||||
#ifdef CONFIG_WP_ACTIVE_HIGH
|
||||
gpio_enable_interrupt(GPIO_WP);
|
||||
#else
|
||||
gpio_enable_interrupt(GPIO_WP_L);
|
||||
#endif
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, switch_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user