diff options
author | Mary Ruthven <mruthven@chromium.org> | 2016-09-14 10:37:54 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-21 19:37:03 -0700 |
commit | 05d387da7873d318d20a5480a761ae35866630a0 (patch) | |
tree | f4e36caae155799ee98c12c893cbd80527b705cd /common | |
parent | 7d430cde7ee6f39e55b5b7ef2863c1263f699eaf (diff) | |
download | chrome-ec-05d387da7873d318d20a5480a761ae35866630a0.tar.gz |
cr50: remove unused detect_off interrupt
The interrupts to detect when the falling edge on the UART signals are
currently disabled and never reenabled. Power off is detected by polling
and not through interrupts. This change removes all of those falling
edge interrupts.
BUG=none
BRANCH=none
TEST=cr50 can detect when the EC, AP, and Servo are off or on
Change-Id: I0fd8a0d970f3235b26af6b90dd395ea7c75e0c17
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/385192
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/device_state.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/common/device_state.c b/common/device_state.c index f8e57c35ff..0c4024880a 100644 --- a/common/device_state.c +++ b/common/device_state.c @@ -37,8 +37,7 @@ DECLARE_HOOK(HOOK_SECOND, check_device_state, HOOK_PRIO_DEFAULT); static int device_has_interrupts(enum device_type device) { return (device_states[device].deferred && - device_states[device].detect_on != GPIO_COUNT && - device_states[device].detect_off != GPIO_COUNT); + device_states[device].detect != GPIO_COUNT); } static void disable_interrupts(enum device_type device) @@ -50,8 +49,7 @@ static void disable_interrupts(enum device_type device) hook_call_deferred(device_states[device].deferred, -1); /* Disable gpio interrupts */ - gpio_disable_interrupt(device_states[device].detect_on); - gpio_disable_interrupt(device_states[device].detect_off); + gpio_disable_interrupt(device_states[device].detect); } static void enable_interrupts(enum device_type device) @@ -60,8 +58,7 @@ static void enable_interrupts(enum device_type device) return; /* Enable gpio interrupts */ - gpio_enable_interrupt(device_states[device].detect_on); - gpio_enable_interrupt(device_states[device].detect_off); + gpio_enable_interrupt(device_states[device].detect); } void device_detect_state_enable(int enable) |