Commit 3c87d7c8 authored by David Lechner's avatar David Lechner Committed by Linus Walleij

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: default avatarDavid Lechner <david@lechnology.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4760b6fa
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/platform_data/gpio-davinci.h> #include <linux/platform_data/gpio-davinci.h>
#include <linux/irqchip/chained_irq.h> #include <linux/irqchip/chained_irq.h>
...@@ -225,6 +226,11 @@ static int davinci_gpio_probe(struct platform_device *pdev) ...@@ -225,6 +226,11 @@ static int davinci_gpio_probe(struct platform_device *pdev)
chips->chip.of_gpio_n_cells = 2; chips->chip.of_gpio_n_cells = 2;
chips->chip.parent = dev; chips->chip.parent = dev;
chips->chip.of_node = dev->of_node; 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 #endif
spin_lock_init(&chips->lock); spin_lock_init(&chips->lock);
bank_base += ngpio; bank_base += ngpio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment