summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch')
-rw-r--r--target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
index 4250398..1148ec4 100644
--- a/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/lantiq/patches-4.4/0030-GPIO-add-named-gpio-exports.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
#include "gpiolib.h"
-@@ -450,3 +452,73 @@
+@@ -450,3 +452,73 @@ void of_gpiochip_remove(struct gpio_chip
gpiochip_remove_pin_ranges(chip);
of_node_put(chip->of_node);
}
@@ -98,7 +98,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+#endif
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
-@@ -122,6 +122,12 @@
+@@ -122,6 +122,12 @@ static inline int gpio_export(unsigned g
return gpiod_export(gpio_to_desc(gpio), direction_may_change);
}
@@ -113,7 +113,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
-@@ -427,6 +427,7 @@
+@@ -427,6 +427,7 @@ static inline struct gpio_desc *devm_get
#if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS)
@@ -121,7 +121,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
int gpiod_export(struct gpio_desc *desc, bool direction_may_change);
int gpiod_export_link(struct device *dev, const char *name,
struct gpio_desc *desc);
-@@ -434,6 +435,13 @@
+@@ -434,6 +435,13 @@ void gpiod_unexport(struct gpio_desc *de
#else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */
@@ -137,7 +137,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
-@@ -544,7 +544,7 @@
+@@ -544,7 +544,7 @@ static struct class gpio_class = {
*
* Returns zero on success, else an error.
*/
@@ -146,7 +146,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
{
struct gpio_chip *chip;
struct gpiod_data *data;
-@@ -604,6 +604,8 @@
+@@ -604,6 +604,8 @@ int gpiod_export(struct gpio_desc *desc,
offset = gpio_chip_hwgpio(desc);
if (chip->names && chip->names[offset])
ioname = chip->names[offset];
@@ -155,7 +155,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
dev = device_create_with_groups(&gpio_class, chip->dev,
MKDEV(0, 0), data, gpio_groups,
-@@ -625,6 +627,12 @@
+@@ -625,6 +627,12 @@ err_unlock:
gpiod_dbg(desc, "%s: status %d\n", __func__, status);
return status;
}