Commit 5c584f17 authored by Nam Cao's avatar Nam Cao Committed by Linus Walleij

pinctrl: starfive: jh7100: ignore disabled device tree nodes

The driver always registers pin configurations in device tree. This can
cause some inconvenience to users, as pin configurations in the base
device tree cannot be disabled in the device tree overlay, even when the
relevant devices are not used.

Ignore disabled pin configuration nodes in device tree.

Fixes: ec648f6b ("pinctrl: starfive: Add pinctrl driver for StarFive SoCs")
Cc:  <stable@vger.kernel.org>
Signed-off-by: default avatarNam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/fe4c15dcc3074412326b8dc296b0cbccf79c49bf.1701422582.git.namcao@linutronix.deSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent f6e3b40a
...@@ -492,7 +492,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev, ...@@ -492,7 +492,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
nmaps = 0; nmaps = 0;
ngroups = 0; ngroups = 0;
for_each_child_of_node(np, child) { for_each_available_child_of_node(np, child) {
int npinmux = of_property_count_u32_elems(child, "pinmux"); int npinmux = of_property_count_u32_elems(child, "pinmux");
int npins = of_property_count_u32_elems(child, "pins"); int npins = of_property_count_u32_elems(child, "pins");
...@@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev, ...@@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
nmaps = 0; nmaps = 0;
ngroups = 0; ngroups = 0;
mutex_lock(&sfp->mutex); mutex_lock(&sfp->mutex);
for_each_child_of_node(np, child) { for_each_available_child_of_node(np, child) {
int npins; int npins;
int i; int i;
......
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