diff options
| author | Lee Jones <lee.jones@linaro.org> | 2017-02-08 04:24:25 -0500 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2017-03-14 05:36:41 -0400 |
| commit | 0043c1dfbec7b6e2427409059b05347d6f51aa9f (patch) | |
| tree | 8114aabec73947d515d2b9229d667d26abcd0be3 /include/linux/gpio | |
| parent | f759921cfbf4847319d197a6ed7c9534d593f8bc (diff) | |
serial: st-asc: Use new GPIOD API to obtain RTS pin
The commits mentioned below adapt the GPIO API to allow more information
to be passed directly through devm_get_gpiod_from_child() in the first
instance. This facilitates the removal of subsequent calls, such as
gpiod_direction_output(). This patch firstly moves to utilise the new
API and secondly removes the now superfluous call do set the direction.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
[Also drop the header file dummies that only this driver was using]
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
| -rw-r--r-- | include/linux/gpio/consumer.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 2484b2fcc6eb..933d93656605 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h | |||
| @@ -143,15 +143,6 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev, | |||
| 143 | struct fwnode_handle *child, | 143 | struct fwnode_handle *child, |
| 144 | enum gpiod_flags flags, | 144 | enum gpiod_flags flags, |
| 145 | const char *label); | 145 | const char *label); |
| 146 | /* FIXME: delete this helper when users are switched over */ | ||
| 147 | static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, | ||
| 148 | const char *con_id, struct fwnode_handle *child) | ||
| 149 | { | ||
| 150 | return devm_fwnode_get_index_gpiod_from_child(dev, con_id, | ||
| 151 | 0, child, | ||
| 152 | GPIOD_ASIS, | ||
| 153 | "?"); | ||
| 154 | } | ||
| 155 | 146 | ||
| 156 | #else /* CONFIG_GPIOLIB */ | 147 | #else /* CONFIG_GPIOLIB */ |
| 157 | 148 | ||
| @@ -444,13 +435,6 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev, | |||
| 444 | return ERR_PTR(-ENOSYS); | 435 | return ERR_PTR(-ENOSYS); |
| 445 | } | 436 | } |
| 446 | 437 | ||
| 447 | /* FIXME: delete this when all users are switched over */ | ||
| 448 | static inline struct gpio_desc *devm_get_gpiod_from_child(struct device *dev, | ||
| 449 | const char *con_id, struct fwnode_handle *child) | ||
| 450 | { | ||
| 451 | return ERR_PTR(-ENOSYS); | ||
| 452 | } | ||
| 453 | |||
| 454 | #endif /* CONFIG_GPIOLIB */ | 438 | #endif /* CONFIG_GPIOLIB */ |
| 455 | 439 | ||
| 456 | static inline | 440 | static inline |
