aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/atheros/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2007-09-23 00:32:31 +0000
committerJohn Crispin <john@openwrt.org>2007-09-23 00:32:31 +0000
commitd7502c446b47c04e5630534663f6aca0dcb60b1d (patch)
tree74b2a6d5e6d591fa0de947370d172d1c43455233 /target/linux/atheros/files
parent059b0d3c54098fb3dd71aea81da5c2fd45b9d239 (diff)
downloadupstream-d7502c446b47c04e5630534663f6aca0dcb60b1d.tar.gz
upstream-d7502c446b47c04e5630534663f6aca0dcb60b1d.tar.bz2
upstream-d7502c446b47c04e5630534663f6aca0dcb60b1d.zip
added option to atheros kernel to be able to disable reset button from inside the fon mp3 driver
SVN-Revision: 8969
Diffstat (limited to 'target/linux/atheros/files')
-rw-r--r--target/linux/atheros/files/arch/mips/atheros/reset.c17
-rw-r--r--target/linux/atheros/files/include/asm-mips/mach-atheros/reset.h6
2 files changed, 21 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);
diff --git a/target/linux/atheros/files/include/asm-mips/mach-atheros/reset.h b/target/linux/atheros/files/include/asm-mips/mach-atheros/reset.h
new file mode 100644
index 0000000000..e9fa4c5b16
--- /dev/null
+++ b/target/linux/atheros/files/include/asm-mips/mach-atheros/reset.h
@@ -0,0 +1,6 @@
+#ifndef __AR531X_RESET_H
+#define __AR531X_RESET_H
+
+void ar531x_disable_reset_button(void);
+
+#endif /* __AR531X_RESET_H */