summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-tegra.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-04-14 15:33:42 -0600
committerLinus Walleij <linus.walleij@linaro.org>2014-04-22 16:53:43 +0200
commit36e80dca9f7381c12d11cb362427979fe640115c (patch)
treebaa54dc57d648d54284f007a240ecea1635413b5 /drivers/pinctrl/pinctrl-tegra.c
parent0298fc3e1b057bd89ecfa3b00c1f5106d50c8136 (diff)
downloadop-kernel-dev-36e80dca9f7381c12d11cb362427979fe640115c.zip
op-kernel-dev-36e80dca9f7381c12d11cb362427979fe640115c.tar.gz
pinctrl: tegra: print better error messages
When an attempt is made to configure an unsupported option on a pin, print the DT property name of that option, so it's easier to debug what the problem is. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra.c')
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index 0faa092..2d43bff 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -413,10 +413,21 @@ static int tegra_pinconf_reg(struct tegra_pmx *pmx,
}
if (*reg < 0 || *bit > 31) {
- if (report_err)
+ if (report_err) {
+ const char *prop = "unknown";
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(cfg_params); i++) {
+ if (cfg_params[i].param == param) {
+ prop = cfg_params[i].property;
+ break;
+ }
+ }
+
dev_err(pmx->dev,
- "Config param %04x not supported on group %s\n",
- param, g->name);
+ "Config param %04x (%s) not supported on group %s\n",
+ param, prop, g->name);
+ }
return -ENOTSUPP;
}
OpenPOWER on IntegriCloud