X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Flantiq%2Fpatches-5.10%2F0030-GPIO-add-named-gpio-exports.patch;fp=target%2Flinux%2Flantiq%2Fpatches-5.10%2F0030-GPIO-add-named-gpio-exports.patch;h=209548bccdadb4d96c76b88aead0126f87023b15;hp=419516978c6c3640f6310246a4cceec9a5c51be9;hb=0806f8fc80e602b88ac80a334dccf07e1334d416;hpb=e44e454ee65bb0631fbea64ea1e30b40735ed97b diff --git a/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch b/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch index 419516978c..209548bccd 100644 --- a/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch +++ b/target/linux/lantiq/patches-5.10/0030-GPIO-add-named-gpio-exports.patch @@ -22,7 +22,7 @@ Signed-off-by: John Crispin #include "gpiolib.h" #include "gpiolib-of.h" -@@ -915,3 +917,72 @@ void of_gpiochip_remove(struct gpio_chip +@@ -1039,3 +1041,72 @@ void of_gpiochip_remove(struct gpio_chip { of_node_put(chip->of_node); } @@ -97,7 +97,7 @@ Signed-off-by: John Crispin +#endif --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h -@@ -127,6 +127,12 @@ static inline int gpio_export(unsigned g +@@ -125,6 +125,12 @@ static inline int gpio_export(unsigned g return gpiod_export(gpio_to_desc(gpio), direction_may_change); } @@ -112,7 +112,7 @@ Signed-off-by: John Crispin { --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h -@@ -668,6 +668,7 @@ static inline void devm_acpi_dev_remove_ +@@ -715,6 +715,7 @@ static inline void devm_acpi_dev_remove_ #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) @@ -120,7 +120,7 @@ Signed-off-by: John Crispin 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); -@@ -675,6 +676,13 @@ void gpiod_unexport(struct gpio_desc *de +@@ -722,6 +723,13 @@ void gpiod_unexport(struct gpio_desc *de #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ @@ -136,7 +136,7 @@ Signed-off-by: John Crispin { --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c -@@ -563,7 +563,7 @@ static struct class gpio_class = { +@@ -564,7 +564,7 @@ static struct class gpio_class = { * * Returns zero on success, else an error. */ @@ -145,7 +145,7 @@ Signed-off-by: John Crispin { struct gpio_chip *chip; struct gpio_device *gdev; -@@ -625,6 +625,8 @@ int gpiod_export(struct gpio_desc *desc, +@@ -626,6 +626,8 @@ int gpiod_export(struct gpio_desc *desc, offset = gpio_chip_hwgpio(desc); if (chip->names && chip->names[offset]) ioname = chip->names[offset]; @@ -154,7 +154,7 @@ Signed-off-by: John Crispin dev = device_create_with_groups(&gpio_class, &gdev->dev, MKDEV(0, 0), data, gpio_groups, -@@ -646,6 +648,12 @@ err_unlock: +@@ -647,6 +649,12 @@ err_unlock: gpiod_dbg(desc, "%s: status %d\n", __func__, status); return status; }