diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-03-17 20:56:17 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-03-19 04:45:54 -0400 |
commit | 964cb341882f920a1a1043864178f22def3193e4 (patch) | |
tree | d59a49475e7c5a869f1c5be1c7a673e254847aff /include/asm-generic/gpio.h | |
parent | 7e9603638ac69696be5bcc2614365c1e8cc892dd (diff) |
gpio: move pincontrol calls to <linux/gpio/driver.h>
These functions do not belong in <asm-generic/gpio.h> since the
split into separate GPIO headers under <linux/gpio/*>. Move them
to <linux/gpio/driver.h> as is apropriate.
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r-- | include/asm-generic/gpio.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 383ade1a211b..9bb0d11729c9 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
7 | #include <linux/of.h> | 7 | #include <linux/of.h> |
8 | #include <linux/pinctrl/pinctrl.h> | ||
9 | 8 | ||
10 | #ifdef CONFIG_GPIOLIB | 9 | #ifdef CONFIG_GPIOLIB |
11 | 10 | ||
@@ -139,53 +138,6 @@ static inline void gpio_unexport(unsigned gpio) | |||
139 | gpiod_unexport(gpio_to_desc(gpio)); | 138 | gpiod_unexport(gpio_to_desc(gpio)); |
140 | } | 139 | } |
141 | 140 | ||
142 | #ifdef CONFIG_PINCTRL | ||
143 | |||
144 | /** | ||
145 | * struct gpio_pin_range - pin range controlled by a gpio chip | ||
146 | * @head: list for maintaining set of pin ranges, used internally | ||
147 | * @pctldev: pinctrl device which handles corresponding pins | ||
148 | * @range: actual range of pins controlled by a gpio controller | ||
149 | */ | ||
150 | |||
151 | struct gpio_pin_range { | ||
152 | struct list_head node; | ||
153 | struct pinctrl_dev *pctldev; | ||
154 | struct pinctrl_gpio_range range; | ||
155 | }; | ||
156 | |||
157 | int gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, | ||
158 | unsigned int gpio_offset, unsigned int pin_offset, | ||
159 | unsigned int npins); | ||
160 | int gpiochip_add_pingroup_range(struct gpio_chip *chip, | ||
161 | struct pinctrl_dev *pctldev, | ||
162 | unsigned int gpio_offset, const char *pin_group); | ||
163 | void gpiochip_remove_pin_ranges(struct gpio_chip *chip); | ||
164 | |||
165 | #else | ||
166 | |||
167 | static inline int | ||
168 | gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name, | ||
169 | unsigned int gpio_offset, unsigned int pin_offset, | ||
170 | unsigned int npins) | ||
171 | { | ||
172 | return 0; | ||
173 | } | ||
174 | static inline int | ||
175 | gpiochip_add_pingroup_range(struct gpio_chip *chip, | ||
176 | struct pinctrl_dev *pctldev, | ||
177 | unsigned int gpio_offset, const char *pin_group) | ||
178 | { | ||
179 | return 0; | ||
180 | } | ||
181 | |||
182 | static inline void | ||
183 | gpiochip_remove_pin_ranges(struct gpio_chip *chip) | ||
184 | { | ||
185 | } | ||
186 | |||
187 | #endif /* CONFIG_PINCTRL */ | ||
188 | |||
189 | #else /* !CONFIG_GPIOLIB */ | 141 | #else /* !CONFIG_GPIOLIB */ |
190 | 142 | ||
191 | static inline bool gpio_is_valid(int number) | 143 | static inline bool gpio_is_valid(int number) |