summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/devicetree.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-04-10 10:00:38 +0200
committerLinus Walleij <linus.walleij@linaro.org>2012-04-18 13:53:11 +0200
commitc05127c4e2c6e7d9949347a76fd05c337bcd5e84 (patch)
tree5b23f8a116919028317f026e3f9998dce2ffb828 /drivers/pinctrl/devicetree.c
parentpinctrl: add some error checking for user interfaces (diff)
downloadlinux-c05127c4e2c6e7d9949347a76fd05c337bcd5e84.tar.xz
linux-c05127c4e2c6e7d9949347a76fd05c337bcd5e84.zip
pinctrl: implement pinctrl deferred probing
If drivers try to obtain pinctrl handles for a pin controller that has not yet registered to the subsystem, we need to be able to back out and retry with deferred probing. So let's return -EPROBE_DEFER whenever this location fails. Also downgrade the errors to info, maybe we will even set them to debug once the deferred probing is commonplace. Cc: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/devicetree.c')
-rw-r--r--drivers/pinctrl/devicetree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 5ef2feb44395..fcb1de45473c 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -121,11 +121,11 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename,
for (;;) {
np_pctldev = of_get_next_parent(np_pctldev);
if (!np_pctldev || of_node_is_root(np_pctldev)) {
- dev_err(p->dev, "could not find pctldev for node %s\n",
+ dev_info(p->dev, "could not find pctldev for node %s, deferring probe\n",
np_config->full_name);
of_node_put(np_pctldev);
- /* FIXME: This should trigger deferrered probe */
- return -ENODEV;
+ /* OK let's just assume this will appear later then */
+ return -EPROBE_DEFER;
}
pctldev = find_pinctrl_by_of_node(np_pctldev);
if (pctldev)