projects
/
oweals
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ramips: Add Airlink101 AR725W board support
[oweals/openwrt.git]
/
target
/
linux
/
ramips
/
patches-3.10
/
0006-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
diff --git
a/target/linux/ramips/patches-3.10/0006-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
b/target/linux/ramips/patches-3.10/0006-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
index cd4f38f925531752321bfc50719b086e279101cd..fd7f7f4f030d8e50204d15e28b2bbe416b4e6a6e 100644
(file)
--- a/
target/linux/ramips/patches-3.10/0006-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
+++ b/
target/linux/ramips/patches-3.10/0006-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
@@
-83,7
+83,7
@@
Cc: linux-gpio@vger.kernel.org
obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
--- /dev/null
+++ b/drivers/gpio/gpio-ralink.c
obj-$(CONFIG_GPIO_RCAR) += gpio-rcar.o
--- /dev/null
+++ b/drivers/gpio/gpio-ralink.c
-@@ -0,0 +1,3
37
@@
+@@ -0,0 +1,3
45
@@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@
-271,18
+271,18
@@
Cc: linux-gpio@vger.kernel.org
+ if ((rg->rising | rg->falling) & mask)
+ return 0;
+
+ if ((rg->rising | rg->falling) & mask)
+ return 0;
+
-+ type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_
RIS
ING;
++ type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_
FALL
ING;
+ }
+
+ if (type & IRQ_TYPE_EDGE_RISING)
+ rg->rising |= mask;
+ else
+ }
+
+ if (type & IRQ_TYPE_EDGE_RISING)
+ rg->rising |= mask;
+ else
-+ rg->rising &= mask;
++ rg->rising &=
~
mask;
+
+
-+ if (type & IRQ_TYPE_EDGE_
RIS
ING)
++ if (type & IRQ_TYPE_EDGE_
FALL
ING)
+ rg->falling |= mask;
+ else
+ rg->falling |= mask;
+ else
-+ rg->falling &= mask;
++ rg->falling &=
~
mask;
+
+ return 0;
+}
+
+ return 0;
+}
@@
-337,6
+337,13
@@
Cc: linux-gpio@vger.kernel.org
+ dev_info(rg->chip.dev, "registering %d irq handlers\n", rg->chip.ngpio);
+}
+
+ dev_info(rg->chip.dev, "registering %d irq handlers\n", rg->chip.ngpio);
+}
+
++static int ralink_gpio_request(struct gpio_chip *chip, unsigned offset)
++{
++ int gpio = chip->base + offset;
++
++ return pinctrl_request_gpio(gpio);
++}
++
+static int ralink_gpio_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+static int ralink_gpio_probe(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
@@
-388,6
+395,7
@@
Cc: linux-gpio@vger.kernel.org
+ rg->chip.direction_output = ralink_gpio_direction_output;
+ rg->chip.get = ralink_gpio_get;
+ rg->chip.set = ralink_gpio_set;
+ rg->chip.direction_output = ralink_gpio_direction_output;
+ rg->chip.get = ralink_gpio_get;
+ rg->chip.set = ralink_gpio_set;
++ rg->chip.request = ralink_gpio_request;
+ rg->chip.to_irq = ralink_gpio_to_irq;
+
+ /* set polarity to low for all lines */
+ rg->chip.to_irq = ralink_gpio_to_irq;
+
+ /* set polarity to low for all lines */