提交 36e80dca 编写于 作者: S Stephen Warren 提交者: Linus Walleij

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: NStephen Warren <swarren@nvidia.com>
Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 0298fc3e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册