mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 05:05:09 +00:00
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 <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/679980 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
a27f1049b6
commit
53532a2e67
@@ -82,6 +82,16 @@ uint32_t power_get_signals(void);
|
||||
*/
|
||||
int power_signal_is_asserted(const struct power_signal_info *s);
|
||||
|
||||
/**
|
||||
* Enable interrupt for provided input signal.
|
||||
*/
|
||||
int power_signal_enable_interrupt(enum gpio_signal signal);
|
||||
|
||||
/**
|
||||
* Disable interrupt for provided input signal.
|
||||
*/
|
||||
int power_signal_disable_interrupt(enum gpio_signal signal);
|
||||
|
||||
/**
|
||||
* Check for required inputs
|
||||
*
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user