[PATCH 11/20] pinctrl: Downgrade pinctrl_get warning when no maps are found

From: Stephen Warren
Date: Mon Feb 20 2012 - 01:49:51 EST


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.

Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
---
drivers/pinctrl/core.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 37dfac7..54e24f7 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -542,13 +542,16 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
num_maps++;
}

- /* We should have atleast one map, right */
- if (!num_maps) {
- pr_err("could not find any mux maps for device %s, ID %s\n",
- devname, name);
- kfree(p);
- return ERR_PTR(-EINVAL);
- }
+ /*
+ * 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.
+ */
+ if (!num_maps)
+ dev_info(dev, "zero maps found for state %s\n", name);

pr_debug("found %u mux maps for device %s, UD %s\n",
num_maps, devname, name);
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/