mirror of https://gitee.com/openkylin/linux.git
Merge branch 'for-4.3/pinctrl' into for-4.3/dt
This commit is contained in:
commit
7292ba64bd
|
@ -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,7 +724,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
|
|||
return PTR_ERR(pmx->pctl);
|
||||
}
|
||||
|
||||
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
|
||||
if (!gpio_node_has_range())
|
||||
pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range);
|
||||
|
||||
platform_set_drvdata(pdev, pmx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue