summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/tegra/pinctrl-tegra.c
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2018-07-26 17:40:24 +0200
committerLinus Walleij <linus.walleij@linaro.org>2018-07-29 23:37:03 +0200
commit3c94d2d08a032d911bbe34f2edb24cb63a63644a (patch)
treeb004755fe7335a3c3e4469758e452606a6ff7e07 /drivers/pinctrl/tegra/pinctrl-tegra.c
parentpinctrl: intel: Do pin translation when lock IRQ (diff)
downloadlinux-3c94d2d08a032d911bbe34f2edb24cb63a63644a.tar.xz
linux-3c94d2d08a032d911bbe34f2edb24cb63a63644a.zip
pinctrl: tegra: define GPIO compatible node per SoC
Tegra 2 uses a different GPIO controller which uses "tegra20-gpio" as compatible string. Make the compatible string the GPIO node is using a SoC specific property. This prevents the kernel from registering the GPIO range twice in case the GPIO range is specified in the device tree. Fixes: 9462510ce31e ("pinctrl: tegra: Only set the gpio range if needed") Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/tegra/pinctrl-tegra.c')
-rw-r--r--drivers/pinctrl/tegra/pinctrl-tegra.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index f974eee29a19..1aba75897d14 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -629,12 +629,12 @@ static void tegra_pinctrl_clear_parked_bits(struct tegra_pmx *pmx)
}
}
-static bool gpio_node_has_range(void)
+static bool gpio_node_has_range(const char *compatible)
{
struct device_node *np;
bool has_prop = false;
- np = of_find_compatible_node(NULL, NULL, "nvidia,tegra30-gpio");
+ np = of_find_compatible_node(NULL, NULL, compatible);
if (!np)
return has_prop;
@@ -728,7 +728,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
tegra_pinctrl_clear_parked_bits(pmx);
- if (!gpio_node_has_range())
+ if (!gpio_node_has_range(pmx->soc->gpio_compatible))
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
platform_set_drvdata(pdev, pmx);