summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux
diff options
context:
space:
mode:
authorsharma-mts <86847754+sharma-mts@users.noreply.github.com>2022-01-07 20:29:57 -0600
committersharma-mts <86847754+sharma-mts@users.noreply.github.com>2022-01-07 20:29:57 -0600
commitd001624362056286af537f98f57228f32ca50581 (patch)
tree9ff99b9c4eb7d044751490e6550c399f24d60ef7 /recipes-kernel/linux
parenta720bc0ca89e6f0f55b623ca0cfa183db8ac72e5 (diff)
downloadmeta-multitech-atmel-d001624362056286af537f98f57228f32ca50581.tar.gz
meta-multitech-atmel-d001624362056286af537f98f57228f32ca50581.tar.bz2
meta-multitech-atmel-d001624362056286af537f98f57228f32ca50581.zip
Added gpio export by name
Diffstat (limited to 'recipes-kernel/linux')
-rw-r--r--recipes-kernel/linux/linux-at91-5.4.81/linux-5.4-export_name_to_desc.patch34
-rw-r--r--recipes-kernel/linux/linux-at91_5.4.81.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/linux-5.4-export_name_to_desc.patch b/recipes-kernel/linux/linux-at91-5.4.81/linux-5.4-export_name_to_desc.patch
new file mode 100644
index 0000000..8fe2a69
--- /dev/null
+++ b/recipes-kernel/linux/linux-at91-5.4.81/linux-5.4-export_name_to_desc.patch
@@ -0,0 +1,34 @@
+diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
+index abdf448b11a3..42d4e1439350 100644
+--- a/drivers/gpio/gpiolib.c
++++ b/drivers/gpio/gpiolib.c
+@@ -296,7 +296,7 @@ static int gpiodev_add_to_list(struct gpio_device *gdev)
+ /*
+ * Convert a GPIO name to its descriptor
+ */
+-static struct gpio_desc *gpio_name_to_desc(const char * const name)
++struct gpio_desc *gpio_name_to_desc(const char * const name)
+ {
+ struct gpio_device *gdev;
+ unsigned long flags;
+@@ -324,6 +324,7 @@ static struct gpio_desc *gpio_name_to_desc(const char * const name)
+ return NULL;
+ }
+
++EXPORT_SYMBOL_GPL(gpio_name_to_desc);
+ /*
+ * Takes the names from gc->names and checks if they are all unique. If they
+ * are, they are assigned to their gpio descriptors.
+diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
+index b8b10a409c7b..7f1b727b5fcc 100644
+--- a/drivers/gpio/gpiolib.h
++++ b/drivers/gpio/gpiolib.h
+@@ -77,7 +77,7 @@ struct gpio_array {
+ unsigned long *set_mask;
+ unsigned long invert_mask[];
+ };
+-
++struct gpio_desc *gpio_name_to_desc(const char * const name);
+ struct gpio_desc *gpiochip_get_desc(struct gpio_chip *chip, u16 hwnum);
+ int gpiod_get_array_value_complex(bool raw, bool can_sleep,
+ unsigned int array_size,
diff --git a/recipes-kernel/linux/linux-at91_5.4.81.bb b/recipes-kernel/linux/linux-at91_5.4.81.bb
index f57d418..25839a9 100644
--- a/recipes-kernel/linux/linux-at91_5.4.81.bb
+++ b/recipes-kernel/linux/linux-at91_5.4.81.bb
@@ -51,6 +51,7 @@ COMMON_PATCHES = " \
SRC_URI_append_mtcdt = "\
${COMMON_PATCHES} \
file://linux-5.4-reserve-5-bit-serial-for-multidrop.patch \
+ file://linux-5.4-export_name_to_desc.patch \
"
SRC_URI_append_mtrv1 = "\
${COMMON_PATCHES} \