Skip to content

Commit f6e3b40

Browse files
covanamlinusw
authored andcommitted
pinctrl: starfive: jh7110: 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: 447976a ("pinctrl: starfive: Add StarFive JH7110 sys controller driver") Cc: <[email protected]> Signed-off-by: Nam Cao <[email protected]> Link: https://lore.kernel.org/r/fd8bf044799ae50a6291ae150ef87b4f1923cacb.1701422582.git.namcao@linutronix.de Signed-off-by: Linus Walleij <[email protected]>
1 parent 33cc938 commit f6e3b40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ static int jh7110_dt_node_to_map(struct pinctrl_dev *pctldev,
135135
int ret;
136136

137137
ngroups = 0;
138-
for_each_child_of_node(np, child)
138+
for_each_available_child_of_node(np, child)
139139
ngroups += 1;
140140
nmaps = 2 * ngroups;
141141

@@ -150,7 +150,7 @@ static int jh7110_dt_node_to_map(struct pinctrl_dev *pctldev,
150150
nmaps = 0;
151151
ngroups = 0;
152152
mutex_lock(&sfp->mutex);
153-
for_each_child_of_node(np, child) {
153+
for_each_available_child_of_node(np, child) {
154154
int npins = of_property_count_u32_elems(child, "pinmux");
155155
int *pins;
156156
u32 *pinmux;

0 commit comments

Comments
 (0)