aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-08-14 21:07:46 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-08-14 21:07:46 +0000
commit0cffb6ab4223c5b26a53302eb4ecf104e9508c56 (patch)
treea661638dd6f786fe3cb979b2da250da6dcef05ab /target/linux
parent10f0eb32c9dac91f027af809959d65270f9db286 (diff)
downloadupstream-0cffb6ab4223c5b26a53302eb4ecf104e9508c56.tar.gz
upstream-0cffb6ab4223c5b26a53302eb4ecf104e9508c56.tar.bz2
upstream-0cffb6ab4223c5b26a53302eb4ecf104e9508c56.zip
ixp4xx: fix GPIOLIB support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22650 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch21
-rw-r--r--target/linux/ixp4xx/patches-2.6.33/402-ixp4xx_gpiolib.patch21
-rw-r--r--target/linux/ixp4xx/patches-2.6.34/402-ixp4xx_gpiolib.patch21
-rw-r--r--target/linux/ixp4xx/patches-2.6.35/402-ixp4xx_gpiolib.patch21
4 files changed, 64 insertions, 20 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch b/target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch
index b3f1336f52..2d2cec5505 100644
--- a/target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch
+++ b/target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch
@@ -8,7 +8,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
-@@ -375,12 +376,39 @@ static struct platform_device *ixp46x_de
+@@ -375,12 +376,50 @@ static struct platform_device *ixp46x_de
unsigned long ixp4xx_exp_bus_size;
EXPORT_SYMBOL(ixp4xx_exp_bus_size);
@@ -17,7 +17,6 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_IN);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_input);
+
+static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
+{
@@ -25,14 +24,26 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_OUT);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_output);
++
++static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
++{
++ int value;
++
++ gpio_line_get(gpio, &value);
++ return value;
++}
++
++static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
++{
++ gpio_line_set(gpio, value);
++}
+
+static struct gpio_chip ixp4xx_gpio_chip = {
+ .label = "IXP4XX_GPIO_CHIP",
+ .direction_input = ixp4xx_gpio_direction_input,
+ .direction_output = ixp4xx_gpio_direction_output,
-+ .get = gpio_get_value,
-+ .set = gpio_set_value,
++ .get = ixp4xx_gpio_get_value,
++ .set = ixp4xx_gpio_set_value,
+ .base = 0,
+ .ngpio = 16,
+};
diff --git a/target/linux/ixp4xx/patches-2.6.33/402-ixp4xx_gpiolib.patch b/target/linux/ixp4xx/patches-2.6.33/402-ixp4xx_gpiolib.patch
index 5b0a63a253..1b1b910656 100644
--- a/target/linux/ixp4xx/patches-2.6.33/402-ixp4xx_gpiolib.patch
+++ b/target/linux/ixp4xx/patches-2.6.33/402-ixp4xx_gpiolib.patch
@@ -8,7 +8,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
-@@ -375,12 +376,39 @@ static struct platform_device *ixp46x_de
+@@ -375,12 +376,50 @@ static struct platform_device *ixp46x_de
unsigned long ixp4xx_exp_bus_size;
EXPORT_SYMBOL(ixp4xx_exp_bus_size);
@@ -17,7 +17,6 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_IN);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_input);
+
+static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
+{
@@ -25,14 +24,26 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_OUT);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_output);
++
++static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
++{
++ int value;
++
++ gpio_line_get(gpio, &value);
++ return value;
++}
++
++static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
++{
++ gpio_line_set(gpio, value);
++}
+
+static struct gpio_chip ixp4xx_gpio_chip = {
+ .label = "IXP4XX_GPIO_CHIP",
+ .direction_input = ixp4xx_gpio_direction_input,
+ .direction_output = ixp4xx_gpio_direction_output,
-+ .get = gpio_get_value,
-+ .set = gpio_set_value,
++ .get = ixp4xx_gpio_get_value,
++ .set = ixp4xx_gpio_set_value,
+ .base = 0,
+ .ngpio = 16,
+};
diff --git a/target/linux/ixp4xx/patches-2.6.34/402-ixp4xx_gpiolib.patch b/target/linux/ixp4xx/patches-2.6.34/402-ixp4xx_gpiolib.patch
index 0ec3a91546..5fb5edba46 100644
--- a/target/linux/ixp4xx/patches-2.6.34/402-ixp4xx_gpiolib.patch
+++ b/target/linux/ixp4xx/patches-2.6.34/402-ixp4xx_gpiolib.patch
@@ -8,7 +8,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
-@@ -375,12 +376,39 @@ static struct platform_device *ixp46x_de
+@@ -375,12 +376,50 @@ static struct platform_device *ixp46x_de
unsigned long ixp4xx_exp_bus_size;
EXPORT_SYMBOL(ixp4xx_exp_bus_size);
@@ -17,7 +17,6 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_IN);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_input);
+
+static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
+{
@@ -25,14 +24,26 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_OUT);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_output);
++
++static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
++{
++ int value;
++
++ gpio_line_get(gpio, &value);
++ return value;
++}
++
++static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
++{
++ gpio_line_set(gpio, value);
++}
+
+static struct gpio_chip ixp4xx_gpio_chip = {
+ .label = "IXP4XX_GPIO_CHIP",
+ .direction_input = ixp4xx_gpio_direction_input,
+ .direction_output = ixp4xx_gpio_direction_output,
-+ .get = gpio_get_value,
-+ .set = gpio_set_value,
++ .get = ixp4xx_gpio_get_value,
++ .set = ixp4xx_gpio_set_value,
+ .base = 0,
+ .ngpio = 16,
+};
diff --git a/target/linux/ixp4xx/patches-2.6.35/402-ixp4xx_gpiolib.patch b/target/linux/ixp4xx/patches-2.6.35/402-ixp4xx_gpiolib.patch
index bfe22272f3..5225507137 100644
--- a/target/linux/ixp4xx/patches-2.6.35/402-ixp4xx_gpiolib.patch
+++ b/target/linux/ixp4xx/patches-2.6.35/402-ixp4xx_gpiolib.patch
@@ -8,7 +8,7 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
-@@ -374,12 +375,39 @@ static struct platform_device *ixp46x_de
+@@ -374,12 +375,50 @@ static struct platform_device *ixp46x_de
unsigned long ixp4xx_exp_bus_size;
EXPORT_SYMBOL(ixp4xx_exp_bus_size);
@@ -17,7 +17,6 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_IN);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_input);
+
+static int ixp4xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level)
+{
@@ -25,14 +24,26 @@
+ gpio_line_config(gpio, IXP4XX_GPIO_OUT);
+ return 0;
+}
-+EXPORT_SYMBOL(ixp4xx_gpio_direction_output);
++
++static int ixp4xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio)
++{
++ int value;
++
++ gpio_line_get(gpio, &value);
++ return value;
++}
++
++static void ixp4xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
++{
++ gpio_line_set(gpio, value);
++}
+
+static struct gpio_chip ixp4xx_gpio_chip = {
+ .label = "IXP4XX_GPIO_CHIP",
+ .direction_input = ixp4xx_gpio_direction_input,
+ .direction_output = ixp4xx_gpio_direction_output,
-+ .get = gpio_get_value,
-+ .set = gpio_set_value,
++ .get = ixp4xx_gpio_get_value,
++ .set = ixp4xx_gpio_set_value,
+ .base = 0,
+ .ngpio = 16,
+};