Message ID | 1551098396-15925-3-git-send-email-patrice.chotard@st.com |
---|---|
State | Accepted |
Delegated to: | Simon Glass |
Headers | show |
Series | Update pinctrl-uclass | expand |
On Mon, 25 Feb 2019 at 05:40, Patrice Chotard <patrice.chotard@st.com> wrote: > > From: Patrick Delaunay <patrick.delaunay@st.com> > > 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> > --- > > Changes in v2: > - Update commit message with explanaition > > drivers/pinctrl/pinctrl-uclass.c | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index abb622cfe79e..9df06a262cd5 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -149,6 +149,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;