summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
diff options
context:
space:
mode:
authorNam Cao <namcao@linutronix.de>2023-12-01 10:23:29 +0100
committerLinus Walleij <linus.walleij@linaro.org>2023-12-04 11:13:01 +0100
commit5c584f175d32f9cc66c909f851cd905da58b39ea (patch)
treeea2e22f93446aad0020d5306cd61891ebbd0ba89 /drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
parentpinctrl: starfive: jh7110: ignore disabled device tree nodes (diff)
downloadlinux-5c584f175d32f9cc66c909f851cd905da58b39ea.tar.xz
linux-5c584f175d32f9cc66c909f851cd905da58b39ea.zip
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: ec648f6b7686 ("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>
Diffstat (limited to 'drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c')
-rw-r--r--drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
index ea70b8c61679..b29b0ab9892b 100644
--- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
+++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7100.c
@@ -492,7 +492,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
nmaps = 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 npins = of_property_count_u32_elems(child, "pins");
@@ -527,7 +527,7 @@ static int starfive_dt_node_to_map(struct pinctrl_dev *pctldev,
nmaps = 0;
ngroups = 0;
mutex_lock(&sfp->mutex);
- for_each_child_of_node(np, child) {
+ for_each_available_child_of_node(np, child) {
int npins;
int i;