diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-02-20 01:45:51 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-02-22 11:59:34 -0500 |
commit | f026fe3d102e9d7f0d040109353ef5a97b5ef92c (patch) | |
tree | 721b39699b68b66d361e4bc8cadc90ed56c45a94 /drivers/pinctrl | |
parent | 9891d98c7ab5712807d87ab40f2a9acd9b317114 (diff) |
pinctrl: downgrade pinctrl_get warning when no maps are found
This may be perfectly legitimate. An IP block may get re-used
across SoCs. Not all of those SoCs may need pinmux settings for the
IP block, e.g. if one SoC dedicates pins to that function but
another doesn't. The driver won't know this, and will always
attempt to set up the pinmux. The mapping table defines whether any
HW programming is actually needed.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
[rebased to fit the applied patch series]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/core.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index 552d8c115c4f..e2d4abb29d1a 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
@@ -567,14 +567,16 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name) | |||
567 | } | 567 | } |
568 | } | 568 | } |
569 | 569 | ||
570 | /* We should have atleast one map, right */ | 570 | /* |
571 | if (!num_maps) { | 571 | * This may be perfectly legitimate. An IP block may get re-used |
572 | pr_err("could not find any mux maps for device %s, ID %s\n", | 572 | * across SoCs. Not all of those SoCs may need pinmux settings for the |
573 | devname ? devname : "(anonymous)", | 573 | * IP block, e.g. if one SoC dedicates pins to that function but |
574 | name ? name : "(undefined)"); | 574 | * another doesn't. The driver won't know this, and will always |
575 | kfree(p); | 575 | * attempt to set up the pinmux. The mapping table defines whether any |
576 | return ERR_PTR(-EINVAL); | 576 | * HW programming is actually needed. |
577 | } | 577 | */ |
578 | if (!num_maps) | ||
579 | dev_info(dev, "zero maps found for mapping %s\n", name); | ||
578 | 580 | ||
579 | pr_debug("found %u mux maps for device %s, UD %s\n", | 581 | pr_debug("found %u mux maps for device %s, UD %s\n", |
580 | num_maps, | 582 | num_maps, |