We have an embedded project, and for our purposes, it seems handy to name all the gpios in the gpio controller device tree stanza using gpio-line-names feature in device tree, mentioned in Documentation/devicetree/bindings/gpio/gpio.txt.

The main flaw in this is that the function gpio_name_to_desc() in source/drivers/gpio/gpiolib.c is not externalized for writing kernel drivers.

There seem to be very few examples of gpio-line-names in the kernel. For instance, arch/arm/boot/dts/ste-hrefv60plus.dtsi has a string HDTV_INTN, but is not used in kernel space anywhere else.

We have looked at the other feature, [-]gpios (and optionally an index), but would prefer the gpio-line-names feature as it is easier to read, and will probably patch our kernel, as it is trivial to externalize the gpio_name_to_desc() function.

Is this a dead or nearly dead feature?

1 Answer 1


Someone on our team found this patch:

Export gpio_name_to_desc() to modular GPIO code

So we are not the only ones who would like this feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.