---
 arch/arm/mach-s3c2410/Makefile     |    2 	1 +	1 -	0 !
 arch/arm/mach-s3c2410/h1940-ints.c |   98 	98 +	0 -	0 !
 arch/arm/mach-s3c2410/mach-h1940.c |    6 	6 +	0 -	0 !
 3 files changed, 105 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/arm/mach-s3c2410/Makefile
===================================================================
--- linux-2.6.orig/arch/arm/mach-s3c2410/Makefile	2006-06-19 21:27:13.000000000 +0200
+++ linux-2.6/arch/arm/mach-s3c2410/Makefile	2006-06-19 21:28:28.000000000 +0200
@@ -40,7 +40,7 @@ obj-$(CONFIG_BAST_PC104_IRQ)	+= bast-irq
 obj-$(CONFIG_MACH_ANUBIS)	+= mach-anubis.o
 obj-$(CONFIG_MACH_OSIRIS)	+= mach-osiris.o
 obj-$(CONFIG_ARCH_BAST)		+= mach-bast.o usb-simtec.o
-obj-$(CONFIG_ARCH_H1940)	+= mach-h1940.o h1940-bluetooth.o h1940-batt.o
+obj-$(CONFIG_ARCH_H1940)	+= mach-h1940.o h1940-bluetooth.o h1940-batt.o h1940-ints.o
 obj-$(CONFIG_MACH_N30)		+= mach-n30.o
 obj-$(CONFIG_ARCH_SMDK2410)	+= mach-smdk2410.o
 obj-$(CONFIG_ARCH_S3C2440)	+= mach-smdk2440.o
Index: linux-2.6/arch/arm/mach-s3c2410/h1940-ints.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6/arch/arm/mach-s3c2410/h1940-ints.c	2006-06-19 21:29:03.000000000 +0200
@@ -0,0 +1,98 @@
+
+#include <linux/interrupt.h>
+#include <linux/platform_device.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#include <asm/arch/regs-gpio.h>
+
+
+struct s3c2410_ints {
+	int irq;
+	int pin;
+	int pin_setting;
+	char *name;
+};
+
+static struct s3c2410_ints h1940_ints[] = {
+	{   IRQ_EINT1,   S3C2410_GPF1,     S3C2410_GPF1_EINT1,            "EINT1" },
+	{  IRQ_EINT12,   S3C2410_GPG4,    S3C2410_GPG4_EINT12,            "Audio" },
+	{  IRQ_EINT13,   S3C2410_GPG5,    S3C2410_GPG5_EINT13,        "Usb cable" },
+	{  IRQ_EINT19,  S3C2410_GPG11,   S3C2410_GPG11_EINT19,           "EINT19" },
+};
+
+static ssize_t h1940ints_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+	return snprintf(buf, PAGE_SIZE,"%x\n",0xdeadbeef);
+}
+static DEVICE_ATTR(gpio, 0644,
+		h1940ints_show,
+		NULL);
+
+
+
+static irqreturn_t s3c2410ints_event(int irq, void *dev_id, struct pt_regs *regs)
+{
+	struct s3c2410_ints *inter = (struct s3c2410_ints *)dev_id;
+
+	printk(KERN_ERR "Unhandled Interrupt: %s\n",inter->name);
+
+	return IRQ_HANDLED;
+}
+
+
+static int __init s3c2410ints_probe(struct platform_device *pdev)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(h1940_ints) ; i++) {
+		s3c2410_gpio_cfgpin(h1940_ints[i].pin,h1940_ints[i].pin_setting);
+		request_irq (h1940_ints[i].irq, s3c2410ints_event,\
+				SA_INTERRUPT, h1940_ints[i].name, &h1940_ints[i]);
+		set_irq_type(h1940_ints[i].irq, IRQT_BOTHEDGE);
+	}
+
+	device_create_file(&pdev->dev, &dev_attr_gpio);
+
+	printk(KERN_INFO "h1940-ints successfully loaded\n");
+
+	return 0;
+}
+
+static int s3c2410ints_remove(struct platform_device *pdev)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(h1940_ints); i++) {
+		disable_irq(h1940_ints[i].irq);
+	}
+
+	return 0;
+}
+
+
+static struct platform_driver s3c2410ints_driver = {
+	.driver		= {
+		.name	= "h1940-ints",
+	},
+	.probe		= s3c2410ints_probe,
+	.remove		= s3c2410ints_remove,
+};
+
+
+static int __init s3c2410ints_init(void)
+{
+	return platform_driver_register(&s3c2410ints_driver);
+}
+
+static void __exit s3c2410ints_exit(void)
+{
+	platform_driver_unregister(&s3c2410ints_driver);
+}
+
+module_init(s3c2410ints_init);
+module_exit(s3c2410ints_exit);
+
+MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
+MODULE_DESCRIPTION("Interrupt test driver");
+MODULE_LICENSE("GPL");
Index: linux-2.6/arch/arm/mach-s3c2410/mach-h1940.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-s3c2410/mach-h1940.c	2006-06-19 21:28:05.000000000 +0200
+++ linux-2.6/arch/arm/mach-s3c2410/mach-h1940.c	2006-06-19 21:28:28.000000000 +0200
@@ -351,6 +351,11 @@ static struct platform_device s3c_device
 	.id               = -1,
 };
 
+static struct platform_device s3c_device_interrupts = {
+	.name             = "h1940-ints",
+	.id               = -1,
+};
+
 static struct platform_device *h1940_devices[] __initdata = {
 	&s3c_device_usb,
 	&s3c_device_lcd,
@@ -366,6 +371,7 @@ static struct platform_device *h1940_dev
 	&s3c_device_leds,
 	&s3c_device_bluetooth,
 	&s3c_device_batt,
+	&s3c_device_interrupts,
 };
 
 static struct s3c24xx_board h1940_board __initdata = {
