summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/serial_mctrl_gpio.h
diff options
context:
space:
mode:
authorErwan Le Ray <erwan.leray@foss.st.com>2022-02-03 20:16:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-08 13:07:16 +0300
commit9978c2f14f20a1aaea3840c16220ef64e4ad1872 (patch)
treeaf050a55b510936779ca41a1c8bf75a70cd44d4c /drivers/tty/serial/serial_mctrl_gpio.h
parent186ab09930aac24fad59a56d22ea507c8505b84f (diff)
downloadlinux-9978c2f14f20a1aaea3840c16220ef64e4ad1872.tar.xz
serial: mctrl_gpio: add a new API to enable / disable wake_irq
Add a new API to enable / disable wake_irq in order to enable gpio irqs as wakeup irqs for the uart port. Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com> Link: https://lore.kernel.org/r/20220203171644.12231-2-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial_mctrl_gpio.h')
-rw-r--r--drivers/tty/serial/serial_mctrl_gpio.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_mctrl_gpio.h b/drivers/tty/serial/serial_mctrl_gpio.h
index b134a0ffc894..fc76910fb105 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -91,6 +91,16 @@ void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios);
*/
void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios);
+/*
+ * Enable gpio wakeup interrupts to enable wake up source.
+ */
+void mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios);
+
+/*
+ * Disable gpio wakeup interrupts to enable wake up source.
+ */
+void mctrl_gpio_disable_irq_wake(struct mctrl_gpios *gpios);
+
#else /* GPIOLIB */
static inline
@@ -142,6 +152,14 @@ static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
{
}
+static inline void mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios)
+{
+}
+
+static inline void mctrl_gpio_disable_irq_wake(struct mctrl_gpios *gpios)
+{
+}
+
#endif /* GPIOLIB */
#endif