Skip to content
Snippets Groups Projects
Commit f717b4c8 authored by Kever Yang's avatar Kever Yang Committed by Simon Glass
Browse files

pinctrl: do not set_state for device without valid ofnode


Not all the udevice have a available DT node, eg. rksdmmc@ff500000.blk
which add by mmc_bind(), these device do not have/need set pinctrl
state.

Signed-off-by: default avatarKever Yang <kever.yang@rock-chips.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 409fc029
No related branches found
No related tags found
No related merge requests found
...@@ -198,6 +198,12 @@ static int pinctrl_select_state_simple(struct udevice *dev) ...@@ -198,6 +198,12 @@ static int pinctrl_select_state_simple(struct udevice *dev)
int pinctrl_select_state(struct udevice *dev, const char *statename) 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. * Try full-implemented pinctrl first.
* If it fails or is not implemented, try simple one. * If it fails or is not implemented, try simple one.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment