mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
gpiolib: fix up function prototypes etc
Commit 69e1601bca88809dc118abd1becb02c15a02ec71 "gpiolib: provide provision to register pin ranges" Got most of it's function prototypes wrong, so fix this up by: - Moving the void declarations into static inlines in <linux/gpio.h> (previously the actual prototypes were declared here...) - Declare the gpiochip_add_pin_range() and gpiochip_remove_pin_ranges() functions in <asm-generic/gpio.h> together with the pin range struct declaration itself. - Actually only implement these very functions in gpiolib.c if CONFIG_PINCTRL is set. - Additionally export the symbols since modules will need to be able to do this. Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
33dfc41461
commit
165adc9c17
3 changed files with 29 additions and 11 deletions
|
@ -72,9 +72,9 @@ static inline int irq_to_gpio(unsigned int irq)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* ! CONFIG_ARCH_HAVE_CUSTOM_GPIO_H */
|
||||
|
||||
#else
|
||||
#else /* ! CONFIG_GENERIC_GPIO */
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
@ -231,9 +231,21 @@ static inline int irq_to_gpio(unsigned irq)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
|
||||
unsigned int pin_base, unsigned int npins);
|
||||
void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
|
||||
#endif
|
||||
#ifdef CONFIG_PINCTRL
|
||||
|
||||
static inline void
|
||||
gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
|
||||
unsigned int pin_base, unsigned int npins)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
gpiochip_remove_pin_ranges(struct gpio_chip *chip)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PINCTRL */
|
||||
|
||||
#endif /* ! CONFIG_GENERIC_GPIO */
|
||||
|
||||
#endif /* __LINUX_GPIO_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue