diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2019-02-25 13:39:56 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-04-11 20:10:05 -0600 |
commit | d39e2bd0b09bc333561b26c1dc6f7d63bab6dbd2 (patch) | |
tree | 90929db3f409d627707bcfb4d5990db463018f8c /drivers/pinctrl/pinctrl-uclass.c | |
parent | dce406e0a2d776424efd03aa6a83b817557d2373 (diff) | |
download | u-boot-d39e2bd0b09bc333561b26c1dc6f7d63bab6dbd2.tar.gz |
dm: pinctrl: Skip gpio-controller node in pinconfig_post_bind()
Some binding define child node gpio-controller without compatible property.
This patch avoid to bind the pinconfig uclass to these node.
For example, the binding for st,stm32-pinctrl
(./device-tree-bindings/pinctrl/st,stm32-pinctrl.txt) defines the GPIO
controller/bank node as sub-node of pincontrol (st,stm32f429-pinctrl)
but without compatible (as it is not mandatory).
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-uclass.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-uclass.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 4e6cef8ae7..0e6c559d5e 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -127,6 +127,9 @@ static int pinconfig_post_bind(struct udevice *dev) ofnode_get_property(node, "compatible", &ret); if (ret >= 0) continue; + /* If this node has "gpio-controller" property, skip */ + if (ofnode_read_bool(node, "gpio-controller")) + continue; if (ret != -FDT_ERR_NOTFOUND) return ret; |