diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-01-21 17:39:08 +0100 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-02-09 10:31:04 +0100 |
commit | 4363aac051fcccb8995b9afb5a4c4cd0a6153c10 (patch) | |
tree | a2a388cbcec48ef17ede8d7a8a5ece8889ca6886 | |
parent | 1da426919dedc2ece25e05f5d8ca131142c7348c (diff) | |
download | u-boot-4363aac051fcccb8995b9afb5a4c4cd0a6153c10.tar.gz |
pinctrl: stm32: bind only the enabled GPIO subnode
Bind only the enabled GPIO subnode, to avoid to probe the node
"gpio-controller" present in SOC dtsi (disabled by default) but
not enabled in the included pincontrol dtsi file.
For example, in stm32mp15xxac-pinctrl.dtsi 2 gpio bank are absent:
gpioj: gpio@5000b000
gpiok: gpio@5000c000
Then these GPIO are absent in output of command "dm tree" and
"gpio status -a"
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
-rw-r--r-- | drivers/pinctrl/pinctrl_stm32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c index 374f76d881..6c98538f56 100644 --- a/drivers/pinctrl/pinctrl_stm32.c +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -409,6 +409,9 @@ static int stm32_pinctrl_bind(struct udevice *dev) dev_for_each_subnode(node, dev) { dev_dbg(dev, "bind %s\n", ofnode_get_name(node)); + if (!ofnode_is_enabled(node)) + continue; + ofnode_get_property(node, "gpio-controller", &ret); if (ret < 0) continue; |