Linux LED subsystem development
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>,
	Pavel Machek <pavel@ucw.cz>,
	linux-leds@vger.kernel.org
Subject: leds-gpio: no GPIO labels (in debugfs)
Date: Wed, 30 Nov 2016 17:24:29 +0100	[thread overview]
Message-ID: <3428499.pbM7ylo2PO@ws-stein> (raw)

Hi,

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?

Best regards,
Alexander Stein
-- 
Dipl.-Inf. Alexander Stein
SYS TEC electronic GmbH
alexander.stein@systec-electronic.com

Legal and Commercial Address:
Am Windrad 2
08468 Heinsdorfergrund
Germany

Office: +49 (0) 3765 38600-0
Fax:    +49 (0) 3765 38600-4100
 
Managing Directors:
	Director Technology/CEO: Dipl.-Phys. Siegmar Schmidt;
	Director Commercial Affairs/COO: Dipl. Ing. (FH) Armin von Collrepp
Commercial Registry:
	Amtsgericht Chemnitz, HRB 28082; USt.-Id Nr. DE150534010

             reply	other threads:[~2016-11-30 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161130162439epcas2p4c540b29ad1d0856e8c5a7155e4d999cf@epcas2p4.samsung.com>
2016-11-30 16:24 ` Alexander Stein [this message]
2016-12-01  8:45   ` leds-gpio: no GPIO labels (in debugfs) Jacek Anaszewski
2016-12-02 12:51     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3428499.pbM7ylo2PO@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rpurdie@rpsys.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox