X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/5f33b429e2ec7a5aa0f78cb1d96e22778c6ea5c3..6cc1945af5c859d4a44918ac14ad23bd3c104d10:/target/linux/ixp4xx/patches-2.6.32/402-ixp4xx_gpiolib.patch?ds=inline 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 631703432..2d2cec550 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 #include -@@ -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, +}; @@ -50,7 +61,7 @@ --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig -@@ -415,6 +415,7 @@ config ARCH_IXP4XX +@@ -418,6 +418,7 @@ config ARCH_IXP4XX select GENERIC_GPIO select GENERIC_TIME select GENERIC_CLOCKEVENTS