[ARM] S3C64XX: add to_irq() support for EINT() GPIO
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 18 Jun 2009 11:30:27 +0000 (13:30 +0200)
committerBen Dooks <ben-linux@fluff.org>
Mon, 22 Jun 2009 13:11:56 +0000 (14:11 +0100)
N group

Add to_irq() function to onvert gpio to irq for external interrupt
group (GPN).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/plat-s3c64xx/gpiolib.c

index da7b60ee5e677fc32d1639fec1b48377af9a53a2..92859290ea338f2cc599b4926ba1354510a90405 100644 (file)
@@ -321,6 +321,11 @@ static struct s3c_gpio_cfg gpio_2bit_cfg_eint11 = {
        .get_pull       = s3c_gpio_getpull_updown,
 };
 
+int s3c64xx_gpio2int_gpn(struct gpio_chip *chip, unsigned pin)
+{
+       return IRQ_EINT(0) + pin;
+}
+
 static struct s3c_gpio_chip gpio_2bit[] = {
        {
                .base   = S3C64XX_GPF_BASE,
@@ -353,6 +358,7 @@ static struct s3c_gpio_chip gpio_2bit[] = {
                        .base   = S3C64XX_GPN(0),
                        .ngpio  = S3C64XX_GPIO_N_NR,
                        .label  = "GPN",
+                       .to_irq = s3c64xx_gpio2int_gpn,
                },
        }, {
                .base   = S3C64XX_GPO_BASE,