From 53532a2e67fa301bea588a198d7afd8d55b4d4b2 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 15 Sep 2017 15:36:56 -0700 Subject: power: Expose power_signal_{enable/disable}_interrupt outside power/common.c 1. Make power_signal_enable_interrupt visible outside power/common.c 2. Add corresponding power_signal_disable_interrupt function. BUG=b:65421825 BRANCH=None TEST=make -j buildall Change-Id: I04b7b053cc1ffe978fcbac5b2cb746d21b198aa2 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/679980 Reviewed-by: Aaron Durbin Reviewed-by: Nicolas Boichat --- power/common.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'power/common.c') diff --git a/power/common.c b/power/common.c index d17a0c9336..50a8096e0b 100644 --- a/power/common.c +++ b/power/common.c @@ -82,7 +82,17 @@ static int power_signal_get_level(enum gpio_signal signal) return gpio_get_level(signal); } -static int power_signal_enable_interrupt(enum gpio_signal signal) +int power_signal_disable_interrupt(enum gpio_signal signal) +{ +#ifdef CONFIG_ESPI_VW_SIGNALS + /* Check signal is from GPIOs or VWs */ + if ((int)signal > VW_SIGNAL_BASE) + return espi_vw_disable_wire_int(signal); +#endif + return gpio_disable_interrupt(signal); +} + +int power_signal_enable_interrupt(enum gpio_signal signal) { #ifdef CONFIG_ESPI_VW_SIGNALS /* Check signal is from GPIOs or VWs */ -- cgit v1.2.1