summaryrefslogtreecommitdiff
path: root/target/linux/atheros/files/arch
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-23 00:32:31 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-09-23 00:32:31 +0000
commit23334c52818e113da1174eeb747f2cb3fc6b1055 (patch)
tree5f966b77a7984448545efcb6320b466588b4a14e /target/linux/atheros/files/arch
parent1f454ba35a07eca3e8725d62abb48c3494ea730e (diff)
added option to atheros kernel to be able to disable reset button from inside the fon mp3 driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8969 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros/files/arch')
-rw-r--r--target/linux/atheros/files/arch/mips/atheros/reset.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/target/linux/atheros/files/arch/mips/atheros/reset.c b/target/linux/atheros/files/arch/mips/atheros/reset.c
index d62c5e1c4e..cc2fb251a1 100644
--- a/target/linux/atheros/files/arch/mips/atheros/reset.c
+++ b/target/linux/atheros/files/arch/mips/atheros/reset.c
@@ -10,12 +10,16 @@
#include "ar531x.h"
#include "ar5315/ar5315.h"
+#define AR531X_RESET_GPIO_IRQ (AR531X_GPIO_IRQ_BASE + bcfg->resetConfigGpio)
+
struct event_t {
struct work_struct wq;
int set;
long int jiffies;
};
+static struct ar531x_boarddata *bcfg;
+
extern struct sock *uevent_sock;
extern u64 uevent_next_seqnum(void);
static int seen;
@@ -94,15 +98,24 @@ static irqreturn_t button_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}
+void ar531x_disable_reset_button(void)
+{
+ disable_irq(AR531X_RESET_GPIO_IRQ);
+}
+
+EXPORT_SYMBOL(ar531x_disable_reset_button);
+
int __init ar531x_init_reset(void)
{
- struct ar531x_boarddata *bcfg;
bcfg = (struct ar531x_boarddata *) board_config;
seen = jiffies;
- request_irq(AR531X_GPIO_IRQ_BASE + bcfg->resetConfigGpio, &button_handler, IRQF_SAMPLE_RANDOM, "ar531x_reset", NULL);
+
+ request_irq(AR531X_RESET_GPIO_IRQ, &button_handler, IRQF_SAMPLE_RANDOM, "ar531x_reset", NULL);
return 0;
}
+
+
module_init(ar531x_init_reset);