Commit 7292ba64 authored by Thierry Reding's avatar Thierry Reding

Merge branch 'for-4.3/pinctrl' into for-4.3/dt

parents d770e558 9462510c
......@@ -624,6 +624,22 @@ static struct pinctrl_desc tegra_pinctrl_desc = {
.owner = THIS_MODULE,
};
static bool gpio_node_has_range(void)
{
struct device_node *np;
bool has_prop = false;
np = of_find_compatible_node(NULL, NULL, "nvidia,tegra30-gpio");
if (!np)
return has_prop;
has_prop = of_find_property(np, "gpio-ranges", NULL);
of_node_put(np);
return has_prop;
}
int tegra_pinctrl_probe(struct platform_device *pdev,
const struct tegra_pinctrl_soc_data *soc_data)
{
......@@ -708,6 +724,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
return PTR_ERR(pmx->pctl);
}
if (!gpio_node_has_range())
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
platform_set_drvdata(pdev, pmx);
......
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