diff options
author | Mary Ruthven <mruthven@google.com> | 2019-01-30 10:17:39 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-02-01 15:19:34 -0800 |
commit | c8522f3eccdae56cff0e1f77a016ca1b268ef801 (patch) | |
tree | 8214427bee81414f41501ac0d2a926cfb520e0a6 | |
parent | 9bf849c6982b32836f0d6d447b055431e42be462 (diff) | |
download | chrome-ec-c8522f3eccdae56cff0e1f77a016ca1b268ef801.tar.gz |
cr50: rename ap and ec detect gpios
These gpios are detecting ap and ec uart. Rename them to reflect that.
We are adding another interrupt for ap state detection. Rename the uart
gpios, so it is a little less confusing.
BUG=none
BRANCH=cr50
TEST=none
Change-Id: I11c8c4465845540e9cda603ddb98c91a8022912b
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1446998
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | board/cr50/ap_uart_state.c | 8 | ||||
-rw-r--r-- | board/cr50/ec_state.c | 8 | ||||
-rw-r--r-- | board/cr50/gpio.inc | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/board/cr50/ap_uart_state.c b/board/cr50/ap_uart_state.c index 42e2feeab4..191ecee95b 100644 --- a/board/cr50/ap_uart_state.c +++ b/board/cr50/ap_uart_state.c @@ -86,7 +86,7 @@ DECLARE_DEFERRED(set_ap_uart_on_deferred); */ void ap_detect_asserted(enum gpio_signal signal) { - gpio_disable_interrupt(GPIO_DETECT_AP); + gpio_disable_interrupt(GPIO_DETECT_AP_UART); hook_call_deferred(&set_ap_uart_on_deferred_data, 0); } @@ -96,10 +96,10 @@ void ap_detect_asserted(enum gpio_signal signal) static void ap_uart_detect(void) { /* Disable interrupts if we had them on for debouncing */ - gpio_disable_interrupt(GPIO_DETECT_AP); + gpio_disable_interrupt(GPIO_DETECT_AP_UART); /* If the AP UART signal is high, make sure it's on */ - if (gpio_get_level(GPIO_DETECT_AP)) { + if (gpio_get_level(GPIO_DETECT_AP_UART)) { hook_call_deferred(&set_ap_uart_on_deferred_data, 0); return; } @@ -108,7 +108,7 @@ static void ap_uart_detect(void) * Make sure the interrupt is enabled. We will need to detect the on * transition if we enter the off or debouncing state */ - gpio_enable_interrupt(GPIO_DETECT_AP); + gpio_enable_interrupt(GPIO_DETECT_AP_UART); /* AP UART wasn't detected. If we're already off, done. */ if (state == DEVICE_STATE_OFF) diff --git a/board/cr50/ec_state.c b/board/cr50/ec_state.c index 28a075a1dd..c9ed7eeb31 100644 --- a/board/cr50/ec_state.c +++ b/board/cr50/ec_state.c @@ -95,7 +95,7 @@ DECLARE_DEFERRED(set_ec_on); */ void ec_detect_asserted(enum gpio_signal signal) { - gpio_disable_interrupt(GPIO_DETECT_EC); + gpio_disable_interrupt(GPIO_DETECT_EC_UART); hook_call_deferred(&set_ec_on_data, 0); } @@ -105,13 +105,13 @@ void ec_detect_asserted(enum gpio_signal signal) static void ec_detect(void) { /* Disable interrupts if we had them on for debouncing */ - gpio_disable_interrupt(GPIO_DETECT_EC); + gpio_disable_interrupt(GPIO_DETECT_EC_UART); if (uart_bitbang_is_enabled()) return; /* If we detect the EC, make sure it's on */ - if (gpio_get_level(GPIO_DETECT_EC)) { + if (gpio_get_level(GPIO_DETECT_EC_UART)) { set_ec_on(); return; } @@ -119,7 +119,7 @@ static void ec_detect(void) * Make sure the interrupt is enabled. We will need to detect the on * transition if we enter the off or debouncing state */ - gpio_enable_interrupt(GPIO_DETECT_EC); + gpio_enable_interrupt(GPIO_DETECT_EC_UART); /* EC wasn't detected. If we're already off, done. */ if (state == DEVICE_STATE_OFF) diff --git a/board/cr50/gpio.inc b/board/cr50/gpio.inc index 46e8250826..b686fe008a 100644 --- a/board/cr50/gpio.inc +++ b/board/cr50/gpio.inc @@ -58,8 +58,8 @@ * system resets. */ GPIO_INT(TPM_RST_L, PIN(1, 0), GPIO_INT_RISING, tpm_rst_deasserted) -GPIO_INT(DETECT_AP, PIN(1, 1), GPIO_INT_HIGH, ap_detect_asserted) -GPIO_INT(DETECT_EC, PIN(1, 2), GPIO_INT_HIGH, ec_detect_asserted) +GPIO_INT(DETECT_AP_UART, PIN(1, 1), GPIO_INT_HIGH, ap_detect_asserted) +GPIO_INT(DETECT_EC_UART, PIN(1, 2), GPIO_INT_HIGH, ec_detect_asserted) /* * DETECT_SERVO and EC_TX_CR50_RX pins must NOT be changed without also changing * the pinmux_regval fields in the bitbang_config in board.c. The pinmux values @@ -205,8 +205,8 @@ PINMUX(FUNC(UART2_RX), B6, DIO_INPUT) /* EC console */ * driving the cr50 uart TX at the same time as servo is driving those pins may * damage both servo and cr50. */ -PINMUX(GPIO(DETECT_AP), A3, DIO_INPUT) -PINMUX(GPIO(DETECT_EC), B6, DIO_INPUT) +PINMUX(GPIO(DETECT_AP_UART), A3, DIO_INPUT) +PINMUX(GPIO(DETECT_EC_UART), B6, DIO_INPUT) PINMUX(GPIO(EC_TX_CR50_RX), B6, DIO_INPUT) PINMUX(GPIO(EC_TX_CR50_RX_OUT), B6, DIO_INPUT) PINMUX(GPIO(DETECT_SERVO), B5, DIO_INPUT) |