gpiolib: export devprop_gpiochip_set_names()
authorJan Kundrát <jan.kundrat@cesnet.cz>
Thu, 7 Mar 2019 13:30:13 +0000 (14:30 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 24 Mar 2019 03:48:02 +0000 (04:48 +0100)
This function is needed in mcp23s08. That driver is a special snowflake
because it supports several hardware chips as a single "GPIO chip" under
Linux.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Phil Reid <preid@electromag.com.au>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-devprop.c
drivers/gpio/gpiolib.h
include/linux/gpio/driver.h

index dd517098ab9529df69ed4d5c7ca6af5b299ee813..0c6f97c09bd9863fa637553a28077788101907a6 100644 (file)
@@ -56,3 +56,5 @@ void devprop_gpiochip_set_names(struct gpio_chip *chip,
 
        kfree(names);
 }
+
+EXPORT_SYMBOL_GPL(devprop_gpiochip_set_names)
index 078ab17b96bf4e84d52d2e159b4f6ee5b5adad77..3243c1eb5c88b557e4a1551dbd974e6cf917189c 100644 (file)
@@ -243,9 +243,6 @@ static inline int gpio_chip_hwgpio(const struct gpio_desc *desc)
        return desc - &desc->gdev->descs[0];
 }
 
-void devprop_gpiochip_set_names(struct gpio_chip *chip,
-                               const struct fwnode_handle *fwnode);
-
 /* With descriptor prefix */
 
 #define gpiod_emerg(desc, fmt, ...)                                           \
index 01497910f02321e0ae7ace79c72fb9a3d82ecf39..951be1715c128a012b963d7e202407370b13ca6d 100644 (file)
@@ -614,6 +614,9 @@ struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum,
                                            enum gpiod_flags flags);
 void gpiochip_free_own_desc(struct gpio_desc *desc);
 
+void devprop_gpiochip_set_names(struct gpio_chip *chip,
+                               const struct fwnode_handle *fwnode);
+
 #else /* CONFIG_GPIOLIB */
 
 static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)