[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH/RFC v2 3/5] gpio: Export gpio_name_to_desc() to modu
From: |
Geert Uytterhoeven |
Subject: |
[Qemu-devel] [PATCH/RFC v2 3/5] gpio: Export gpio_name_to_desc() to modular GPIO code |
Date: |
Wed, 11 Sep 2019 16:38:56 +0200 |
Make gpio_name_to_desc() global, and export its symbol, so modular GPIO
driver can make use of this function.
This will be used by the GPIO Aggregator.
Signed-off-by: Geert Uytterhoeven <address@hidden>
---
drivers/gpio/gpiolib.c | 3 ++-
drivers/gpio/gpiolib.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index c2cf01fb72a9de87..c0caafd111e6ff51 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -288,7 +288,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;
@@ -315,6 +315,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
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h
index b8b10a409c7b9c65..240d2868a3024b52 100644
--- a/drivers/gpio/gpiolib.h
+++ b/drivers/gpio/gpiolib.h
@@ -117,6 +117,7 @@ struct gpio_desc {
const char *name;
};
+struct gpio_desc *gpio_name_to_desc(const char * const name);
int gpiod_request(struct gpio_desc *desc, const char *label);
void gpiod_free(struct gpio_desc *desc);
int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
--
2.17.1
- [Qemu-devel] [PATCH/RFC v2 0/5] gpio: Add GPIO Aggregator Driver, Geert Uytterhoeven, 2019/09/11
- [Qemu-devel] [PATCH/RFC v2 3/5] gpio: Export gpio_name_to_desc() to modular GPIO code,
Geert Uytterhoeven <=
- [Qemu-devel] [PATCH/RFC v2 5/5] gpio: Add GPIO Aggregator Driver, Geert Uytterhoeven, 2019/09/11
- [Qemu-devel] [PATCH/RFC v2 1/5] gpio: Export gpiod_{request, free}() to modular GPIO code, Geert Uytterhoeven, 2019/09/11
- [Qemu-devel] [PATCH/RFC v2 2/5] gpio: Export gpiochip_get_desc() to modular GPIO code, Geert Uytterhoeven, 2019/09/11
- [Qemu-devel] [PATCH/RFC v2 4/5] gpio: Add GPIO Forwarder Helper, Geert Uytterhoeven, 2019/09/11