"leds: gpio: Use generic support for composing LED names" breaks gpio debugfs
From: Russell King - ARM Linux admin
Date: Wed Dec 04 2019 - 06:02:34 EST
Hi,
Patch d7235f5feaa0 ("leds: gpio: Use generic support for composing LED
names") changed the way labels are used.
devm_fwnode_get_gpiod_from_child() is passed led.name, which used to be
set to the label or node name, resulting in /sys/kernel/debug/gpio
containing useful information. For example:
gpio-487 ( |udpu:green:power ) out lo
gpio-488 ( |udpu:red:power ) out hi
gpio-489 ( |udpu:green:network ) out hi
gpio-490 ( |udpu:red:network ) out hi
gpio-491 ( |udpu:green:alarm ) out hi
gpio-492 ( |udpu:red:alarm ) out hi
After this commit, it now contains a rather less useful:
gpio-487 ( |? ) out hi ACTIVE LOW
gpio-488 ( |? ) out hi ACTIVE LOW
gpio-489 ( |? ) out hi ACTIVE LOW
gpio-490 ( |? ) out hi ACTIVE LOW
gpio-491 ( |? ) out hi ACTIVE LOW
gpio-492 ( |? ) out hi ACTIVE LOW
This is because led.name is now NULL prior to the call to
devm_fwnode_get_gpiod_from_child().
While this is not an API, it is useful for debugging, and given the
dynamic allocation of GPIOs to physical GPIOs, having the labels
present is an advantage.
Can this be fixed / old behaviour restored?
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up