gpiolib: introduce fwnode_gpiod_get_index()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 13 Sep 2019 03:22:39 +0000 (20:22 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 3 Oct 2019 10:04:28 +0000 (12:04 +0200)
commit13949fa9daa91a60c7cfef40755f7611cc2cf653
tree443c771cc46b00b469441305f0ca4a00cfb2672f
parent2d2f116d69c127099553afe0d87cf9c0bbe2759e
gpiolib: introduce fwnode_gpiod_get_index()

This introduces fwnode_gpiod_get_index() that iterates through common gpio
suffixes when trying to locate a GPIO within a given firmware node.

We also switch devm_fwnode_gpiod_get_index() to call
fwnode_gpiod_get_index() instead of iterating through GPIO suffixes on
its own.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20190913032240.50333-3-dmitry.torokhov@gmail.com
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-devres.c
drivers/gpio/gpiolib.c
include/linux/gpio/consumer.h