aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-11-06 08:49:39 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-11 13:06:04 -0500
commit165adc9c1734a3f3bdbc6dc7c7a29bbefb424006 (patch)
tree3da612f7408e59d9956886952e118e4fd977ef20 /include/asm-generic
parent33dfc41461b77e2b38673ec1b5622b1d9340324d (diff)
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>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/gpio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 92e5c432421..2e60de4265a 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -49,6 +49,7 @@ struct module;
49struct device_node; 49struct device_node;
50 50
51#ifdef CONFIG_PINCTRL 51#ifdef CONFIG_PINCTRL
52
52/** 53/**
53 * struct gpio_pin_range - pin range controlled by a gpio chip 54 * struct gpio_pin_range - pin range controlled by a gpio chip
54 * @head: list for maintaining set of pin ranges, used internally 55 * @head: list for maintaining set of pin ranges, used internally
@@ -61,6 +62,11 @@ struct gpio_pin_range {
61 struct pinctrl_dev *pctldev; 62 struct pinctrl_dev *pctldev;
62 struct pinctrl_gpio_range range; 63 struct pinctrl_gpio_range range;
63}; 64};
65
66void gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
67 unsigned int pin_base, unsigned int npins);
68void gpiochip_remove_pin_ranges(struct gpio_chip *chip);
69
64#endif 70#endif
65 71
66/** 72/**