Skip to content

Commit

Permalink
gpiolib: export devprop_gpiochip_set_names()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Kundrát authored and Linus Walleij committed Mar 24, 2019
1 parent 9e98c67 commit 64ebde5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions drivers/gpio/gpiolib-devprop.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,5 @@ void devprop_gpiochip_set_names(struct gpio_chip *chip,

kfree(names);
}

EXPORT_SYMBOL_GPL(devprop_gpiochip_set_names)
3 changes: 0 additions & 3 deletions drivers/gpio/gpiolib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...) \
Expand Down
3 changes: 3 additions & 0 deletions include/linux/gpio/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 64ebde5

Please sign in to comment.