From d39e2bd0b09bc333561b26c1dc6f7d63bab6dbd2 Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Mon, 25 Feb 2019 13:39:56 +0100 Subject: [PATCH] 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 Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass --- drivers/pinctrl/pinctrl-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 4e6cef8..0e6c559 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; -- 2.7.4