S3C24XX: Add gpio_to_irq implementation Add the necessary to_irq fields for the S3C24XX GPIO banks that support IRQs. Signed-off-by: Ben Dooks Index: linux-2.6.26-quilt3/arch/arm/plat-s3c24xx/gpiolib.c =================================================================== --- linux-2.6.26-quilt3.orig/arch/arm/plat-s3c24xx/gpiolib.c 2008-07-18 12:35:15.000000000 +0100 +++ linux-2.6.26-quilt3/arch/arm/plat-s3c24xx/gpiolib.c 2008-07-18 12:37:39.000000000 +0100 @@ -150,6 +150,19 @@ static int s3c24xx_gpiolib_banka_output( return 0; } +static int s3c24xx_gpiolib_bankf_toirq(struct gpio_chip *chip, unsigned offset) +{ + if (offset < 4) + return IRQ_EINT0 + offset; + + return IRQ_EINT4 + (offset - 4); +} + +static int s3c24xx_gpiolib_bankg_toirq(struct gpio_chip *chip, unsigned offset) +{ + return IRQ_EINT8 + offset; +} + struct s3c24xx_gpio_chip gpios[] = { [0] = { @@ -228,6 +241,7 @@ struct s3c24xx_gpio_chip gpios[] = { .direction_output = s3c24xx_gpiolib_output, .set = s3c24xx_gpiolib_set, .get = s3c24xx_gpiolib_get, + .to_irq = s3c24xx_gpiolib_bankf_toirq, }, }, [6] = { @@ -241,6 +255,7 @@ struct s3c24xx_gpio_chip gpios[] = { .direction_output = s3c24xx_gpiolib_output, .set = s3c24xx_gpiolib_set, .get = s3c24xx_gpiolib_get, + .to_irq = s3c24xx_gpiolib_bankg_toirq, }, }, };