On Thu, Dec 1, 2016 at 9:45 AM, Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx> wrote: > On 11/30/2016 05:24 PM, Alexander Stein wrote: >> I jut noticed that the used GPIOs for leds-gpio do not have an actual >> label >> which is visible in debugfs (/sys/kernel/debug/gpio): >>> >>> gpiochip4: GPIOs 368-383, parent: spi/spi0.2, mcp23s17, can sleep: >>> gpio-369 P0.1 (? ) out hi >>> gpio-370 P0.2 (? ) out lo >>> gpio-371 P0.3 (? ) out lo >>> gpio-372 P0.4 (? ) out lo >>> gpio-373 P0.5 (? ) out lo >>> gpio-374 P0.6 (? ) out lo >> >> The reason is that the call to devm_get_gpiod_from_child() in >> gpio_leds_create() eventually calls "gpiod_request(desc, NULL);" in >> fwnode_get_named_gpiod. So no label attached to GPIO, hence "?" output. >> >> As we have already a gpiod in create_gpio_led(), devm_gpio_request_one() >> with >> the proper label is not called. >> I don't know much of that code, so what would be needed to have a proper >> GPIO >> label? And how? > > From the LED subsystem perspective everything looks OK both > in the case when label is defined and without it (node name is > used for the LED class device name then). > > Since this seems to be an issue within GPIOLIB internals, > I'm adding Linus Walleij. The consumer label is entirely optional, it's just a very nice thing to get right for debugging and feeling you have everything in check on the system. So it's not a bug, it is an optional feature. If you want to fix it better looking I guess dig into the code :) Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html