[U-Boot] [PATCH] pinctrl: do not set_state for device without valid ofnode
Kever Yang
kever.yang at rock-chips.com
Wed Apr 18 09:54:04 UTC 2018
Not all the udevice have a available DT node, eg. rksdmmc at ff500000.blk
which add by mmc_bind(), these device do not have/need set pinctrl
state.
Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---
drivers/pinctrl/pinctrl-uclass.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 6a73a06..a19c374 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -209,6 +209,12 @@ static int pinctrl_select_state_simple(struct udevice *dev)
int pinctrl_select_state(struct udevice *dev, const char *statename)
{
/*
+ * Some device which is logical like mmc.blk, do not have
+ * a valid ofnode.
+ */
+ if (!ofnode_valid(dev->node))
+ return 0;
+ /*
* Try full-implemented pinctrl first.
* If it fails or is not implemented, try simple one.
*/
--
1.9.1
More information about the U-Boot
mailing list