diff options
author | David Lechner <david@lechnology.com> | 2018-01-22 02:09:40 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-02-12 11:36:06 +0300 |
commit | 3c87d7c874b2119c1cff4eee5586b9a6bc0b7fe9 (patch) | |
tree | b255a45c17dd8f17eaec7e38c08e206af005628c /drivers/gpio/gpio-davinci.c | |
parent | 4760b6fa442276783aa4294e131b72fea8c5a18a (diff) | |
download | linux-3c87d7c874b2119c1cff4eee5586b9a6bc0b7fe9.tar.xz |
gpio: davinci: add support for pinmux gpio ranges
This adds support for the pinmux gpio ranges feature to the DaVinci gpio
driver. Only device tree is supported since the non-DT boards don't
use a generic pinmux controller.
Cc: Keerthy <j-keerthy@ti.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-davinci.c')
-rw-r--r-- | drivers/gpio/gpio-davinci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 0b951ca78ec4..987126c4c6f6 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -20,6 +20,7 @@ #include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <linux/platform_data/gpio-davinci.h> #include <linux/irqchip/chained_irq.h> @@ -225,6 +226,11 @@ static int davinci_gpio_probe(struct platform_device *pdev) chips->chip.of_gpio_n_cells = 2; chips->chip.parent = dev; chips->chip.of_node = dev->of_node; + + if (of_property_read_bool(dev->of_node, "gpio-ranges")) { + chips->chip.request = gpiochip_generic_request; + chips->chip.free = gpiochip_generic_free; + } #endif spin_lock_init(&chips->lock); bank_base += ngpio; |