Commit 85ea29ac authored by Tushar Behera's avatar Tushar Behera Committed by Linus Walleij

gpiolib: of: Update debug messages for of_get_named_gpiod_flags

Following is the debug output (only a few examples) before and after
the patch.

$ dmesg | grep of_get_named_gpiod_flags

Before:
of_get_named_gpiod_flags: can't parse gpios property
 of node '/mmc@12220000[0]'
of_get_named_gpiod_flags exited with status 0

After:
of_get_named_gpiod_flags: can't parse 'wp-gpios' property
 of node '/mmc@12220000[0]'
of_get_named_gpiod_flags: parsed 'gpios' property of node
 '/gpio-keys/power[0]' - status (0)
Signed-off-by: default avatarTushar Behera <tushar.b@samsung.com>
Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 122c94de
......@@ -82,15 +82,16 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index,
&gg_data.gpiospec);
if (ret) {
pr_debug("%s: can't parse gpios property of node '%s[%d]'\n",
__func__, np->full_name, index);
pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n",
__func__, propname, np->full_name, index);
return ERR_PTR(ret);
}
gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);
of_node_put(gg_data.gpiospec.np);
pr_debug("%s exited with status %d\n", __func__,
pr_debug("%s: parsed '%s' property of node '%s[%d]' - status (%d)\n",
__func__, propname, np->full_name, index,
PTR_ERR_OR_ZERO(gg_data.out_gpio));
return gg_data.out_gpio;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment