aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gpio
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-01-09 16:02:28 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 09:59:32 +0100
commita264d10ff45c688293d9112fddd8d29c819e0853 (patch)
tree850a9dac5d81c8dfdd8bb4bcdc5247408ea59d9e /include/linux/gpio
parentLinux 4.10-rc1 (diff)
downloadlinux-dev-a264d10ff45c688293d9112fddd8d29c819e0853.tar.xz
linux-dev-a264d10ff45c688293d9112fddd8d29c819e0853.zip
gpiolib: Convert fwnode_get_named_gpiod() to configure GPIO
Make fwnode_get_named_gpiod() consistent with the rest of gpiod_get() like API, i.e. configure GPIO pin immediately after request. Besides obvious clean up it will help to configure pins based on firmware provided resources. Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r--include/linux/gpio/consumer.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index fb0fde686cb1..930d10049d8d 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -135,10 +135,12 @@ int desc_to_gpio(const struct gpio_desc *desc);
struct fwnode_handle;
struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,
- const char *propname);
+ const char *propname,
+ enum gpiod_flags dflags);
struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
const char *con_id,
- struct fwnode_handle *child);
+ struct fwnode_handle *child,
+ enum gpiod_flags flags);
#else /* CONFIG_GPIOLIB */
static inline int gpiod_count(struct device *dev, const char *con_id)
@@ -411,14 +413,19 @@ static inline int desc_to_gpio(const struct gpio_desc *desc)
/* Child properties interface */
struct fwnode_handle;
-static inline struct gpio_desc *fwnode_get_named_gpiod(
- struct fwnode_handle *fwnode, const char *propname)
+static inline
+struct gpio_desc *fwnode_get_named_gpiod(struct fwnode_handle *fwnode,
+ const char *propname,
+ enum gpiod_flags dflags)
{
return ERR_PTR(-ENOSYS);
}
-static inline struct gpio_desc *devm_get_gpiod_from_child(
- struct device *dev, const char *con_id, struct fwnode_handle *child)
+static inline
+struct gpio_desc *devm_get_gpiod_from_child(struct device *dev,
+ const char *con_id,
+ struct fwnode_handle *child,
+ enum gpiod_flags flags)
{
return ERR_PTR(-ENOSYS);
}