Skip to content

Commit

Permalink
pinctrl: tegra: Do not add default pin range on Tegra194
Browse files Browse the repository at this point in the history
On Tegra194, almost all of the pin control programming happens in early
boot firmware, so there is no use in having a pin range defined for all
the pins.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200319122737.3063291-8-thierry.reding@gmail.com
Tested-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Thierry Reding authored and Linus Walleij committed Mar 27, 2020
1 parent 6e01e0c commit f67499f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pinctrl/tegra/pinctrl-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ int tegra_pinctrl_probe(struct platform_device *pdev,

tegra_pinctrl_clear_parked_bits(pmx);

if (!tegra_pinctrl_gpio_node_has_range(pmx))
if (pmx->soc->ngpios > 0 && !tegra_pinctrl_gpio_node_has_range(pmx))
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);

platform_set_drvdata(pdev, pmx);
Expand Down
1 change: 0 additions & 1 deletion drivers/pinctrl/tegra/pinctrl-tegra194.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ static const struct tegra_pingroup tegra194_groups[] = {
};

static const struct tegra_pinctrl_soc_data tegra194_pinctrl = {
.ngpios = TEGRA_PIN_NUM_GPIOS,
.pins = tegra194_pins,
.npins = ARRAY_SIZE(tegra194_pins),
.functions = tegra194_functions,
Expand Down

0 comments on commit f67499f

Please sign in to comment.