mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
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: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
409fc029c4
commit
f717b4c8e7
1 changed files with 6 additions and 0 deletions
|
@ -198,6 +198,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.
|
||||
|
|
Loading…
Add table
Reference in a new issue