diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-09-20 11:56:10 +0200 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-29 08:51:54 +0200 |
commit | 41fe35a99a95442f7221b925895cdcd362fb1962 (patch) | |
tree | e1152b355bbbfd2dc67d3d4561abfb09d18b8371 /arch/arm/mach-ux500/pm/suspend_dbg.c | |
parent | 2deda24045d4253ee36f656bb037896133021404 (diff) |
ARM: ux500: suspend: Add wake on uart
Change-Id: Ia9ae6894333ee8d696a2b946b565496e1c26554f
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32077
Diffstat (limited to 'arch/arm/mach-ux500/pm/suspend_dbg.c')
-rw-r--r-- | arch/arm/mach-ux500/pm/suspend_dbg.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/pm/suspend_dbg.c b/arch/arm/mach-ux500/pm/suspend_dbg.c new file mode 100644 index 00000000000..601b1282230 --- /dev/null +++ b/arch/arm/mach-ux500/pm/suspend_dbg.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) ST-Ericsson SA 2010-2011 + * + * License Terms: GNU General Public License v2 + * + * Author: Rickard Andersson <rickard.andersson@stericsson.com>, + * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson + * + */ +#include <linux/kernel.h> +#include <linux/irq.h> +#include <linux/interrupt.h> +#include <linux/gpio.h> + +#ifdef CONFIG_UX500_SUSPEND_DBG_WAKE_ON_UART +void ux500_suspend_dbg_add_wake_on_uart(void) +{ + irq_set_irq_wake(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), 1); + irq_set_irq_type(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), + IRQ_TYPE_EDGE_BOTH); +} + +void ux500_suspend_dbg_remove_wake_on_uart(void) +{ + irq_set_irq_wake(GPIO_TO_IRQ(CONFIG_UX500_CONSOLE_UART_GPIO_PIN), 0); +} +#endif |