mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
dm: add debug message when failed to select the default pinctrl
Add a message on probe in driver model core when the default pinctrl selection failed. This message is displayed only when the pinctrl API is implemented, i.e. when result is not ENOSYS. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1c01712ac4
commit
af13df7014
1 changed files with 12 additions and 4 deletions
|
@ -533,8 +533,12 @@ int device_probe(struct udevice *dev)
|
|||
* is set just above. However, the PCI bus' probe() method and
|
||||
* associated uclass methods have not yet been called.
|
||||
*/
|
||||
if (dev->parent && device_get_uclass_id(dev) != UCLASS_PINCTRL)
|
||||
pinctrl_select_state(dev, "default");
|
||||
if (dev->parent && device_get_uclass_id(dev) != UCLASS_PINCTRL) {
|
||||
ret = pinctrl_select_state(dev, "default");
|
||||
if (ret && ret != -ENOSYS)
|
||||
log_debug("Device '%s' failed to configure default pinctrl: %d (%s)\n",
|
||||
dev->name, ret, errno_str(ret));
|
||||
}
|
||||
|
||||
if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent &&
|
||||
(device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) &&
|
||||
|
@ -586,8 +590,12 @@ int device_probe(struct udevice *dev)
|
|||
if (ret)
|
||||
goto fail_uclass;
|
||||
|
||||
if (dev->parent && device_get_uclass_id(dev) == UCLASS_PINCTRL)
|
||||
pinctrl_select_state(dev, "default");
|
||||
if (dev->parent && device_get_uclass_id(dev) == UCLASS_PINCTRL) {
|
||||
ret = pinctrl_select_state(dev, "default");
|
||||
if (ret && ret != -ENOSYS)
|
||||
log_debug("Device '%s' failed to configure default pinctrl: %d (%s)\n",
|
||||
dev->name, ret, errno_str(ret));
|
||||
}
|
||||
|
||||
return 0;
|
||||
fail_uclass:
|
||||
|
|
Loading…
Reference in a new issue