Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Tushar Behera <tushar.b@samsung.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Tushar Behera and committed by
Linus Walleij
85ea29ac 122c94de

+4 -3
+4 -3
drivers/gpio/gpiolib-of.c
··· 82 82 ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index, 83 83 &gg_data.gpiospec); 84 84 if (ret) { 85 - pr_debug("%s: can't parse gpios property of node '%s[%d]'\n", 86 - __func__, np->full_name, index); 85 + pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n", 86 + __func__, propname, np->full_name, index); 87 87 return ERR_PTR(ret); 88 88 } 89 89 90 90 gpiochip_find(&gg_data, of_gpiochip_find_and_xlate); 91 91 92 92 of_node_put(gg_data.gpiospec.np); 93 - pr_debug("%s exited with status %d\n", __func__, 93 + pr_debug("%s: parsed '%s' property of node '%s[%d]' - status (%d)\n", 94 + __func__, propname, np->full_name, index, 94 95 PTR_ERR_OR_ZERO(gg_data.out_gpio)); 95 96 return gg_data.out_gpio; 96 97 }