aboutsummaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-uclass.c')
-rw-r--r--drivers/pinctrl/pinctrl-uclass.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 5b1cd29d862..0b1eb7fab4a 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -91,12 +91,18 @@ static int pinctrl_select_state_full(struct udevice *dev, const char *statename)
phandle = fdt32_to_cpu(*list++);
ret = uclass_get_device_by_phandle_id(UCLASS_PINCONFIG, phandle,
&config);
- if (ret)
- return ret;
+ if (ret) {
+ dev_warn(dev, "%s: uclass_get_device_by_phandle_id: err=%d\n",
+ __func__, ret);
+ continue;
+ }
ret = pinctrl_config_one(config);
- if (ret)
- return ret;
+ if (ret) {
+ dev_warn(dev, "%s: pinctrl_config_one: err=%d\n",
+ __func__, ret);
+ continue;
+ }
}
return 0;
@@ -151,7 +157,9 @@ static int pinconfig_post_bind(struct udevice *dev)
UCLASS_DRIVER(pinconfig) = {
.id = UCLASS_PINCONFIG,
+#if CONFIG_IS_ENABLED(PINCONFIG_RECURSIVE)
.post_bind = pinconfig_post_bind,
+#endif
.name = "pinconfig",
};
@@ -395,7 +403,7 @@ int pinctrl_get_pin_muxing(struct udevice *dev, int selector, char *buf,
* @dev: pinctrl device
* @return: 0 on success, or negative error code on failure
*/
-static int pinctrl_post_bind(struct udevice *dev)
+static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
{
const struct pinctrl_ops *ops = pinctrl_get_ops(dev);
@@ -418,7 +426,9 @@ static int pinctrl_post_bind(struct udevice *dev)
UCLASS_DRIVER(pinctrl) = {
.id = UCLASS_PINCTRL,
+#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
.post_bind = pinctrl_post_bind,
+#endif
.flags = DM_UC_FLAG_SEQ_ALIAS,
.name = "pinctrl",
};