summaryrefslogtreecommitdiffstats
path: root/kernel/arch/mips/rb532
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/mips/rb532')
-rw-r--r--kernel/arch/mips/rb532/devices.c1
-rw-r--r--kernel/arch/mips/rb532/gpio.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/kernel/arch/mips/rb532/devices.c b/kernel/arch/mips/rb532/devices.c
index e31e8cdcb..9bd7a2de0 100644
--- a/kernel/arch/mips/rb532/devices.c
+++ b/kernel/arch/mips/rb532/devices.c
@@ -23,6 +23,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
+#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/serial_8250.h>
diff --git a/kernel/arch/mips/rb532/gpio.c b/kernel/arch/mips/rb532/gpio.c
index 5aa3df853..650d5d39f 100644
--- a/kernel/arch/mips/rb532/gpio.c
+++ b/kernel/arch/mips/rb532/gpio.c
@@ -140,6 +140,11 @@ static int rb532_gpio_direction_output(struct gpio_chip *chip,
return 0;
}
+static int rb532_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
+{
+ return 8 + 4 * 32 + gpio;
+}
+
static struct rb532_gpio_chip rb532_gpio_chip[] = {
[0] = {
.chip = {
@@ -148,6 +153,7 @@ static struct rb532_gpio_chip rb532_gpio_chip[] = {
.direction_output = rb532_gpio_direction_output,
.get = rb532_gpio_get,
.set = rb532_gpio_set,
+ .to_irq = rb532_gpio_to_irq,
.base = 0,
.ngpio = 32,
},