Skip to content

Commit 6e827b1

Browse files
covanamgregkh
authored andcommitted
pinctrl: starfive: jh7100: ignore disabled device tree nodes
commit 5c584f1 upstream. 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: ec648f6 ("pinctrl: starfive: Add pinctrl driver for StarFive SoCs") Cc: <stable@vger.kernel.org> Signed-off-by: Nam Cao <namcao@linutronix.de> Link: https://lore.kernel.org/r/fe4c15dcc3074412326b8dc296b0cbccf79c49bf.1701422582.git.namcao@linutronix.de Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc958dd commit 6e827b1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
492492

493493
nmaps = 0;
494494
ngroups = 0;
495-
for_each_child_of_node(np, child) {
495+
for_each_available_child_of_node(np, child) {
496496
int npinmux = of_property_count_u32_elems(child, "pinmux");
497497
int npins = of_property_count_u32_elems(child, "pins");
498498

@@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
527527
nmaps = 0;
528528
ngroups = 0;
529529
mutex_lock(&sfp->mutex);
530-
for_each_child_of_node(np, child) {
530+
for_each_available_child_of_node(np, child) {
531531
int npins;
532532
int i;
533533

0 commit comments

Comments
 (0)