gpio: Add API to explicitly name a consumer
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 1 Jun 2018 11:21:27 +0000 (13:21 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Jun 2018 05:55:30 +0000 (07:55 +0200)
commit90b39402e9f31c4aab48dc1a43d85a724065793f
tree2c359988d15ffb3dfa8754f20f19e1ad9b77fff9
parentf3a049e784b337e9fa08f2f9046c955cc80af535
gpio: Add API to explicitly name a consumer

The GPIO (descriptor) API registers a "label" naming what is
currently using the GPIO line. Typically this is taken from
things like the device tree node, so "reset-gpios" will result
in he line being labeled "reset".

The technical effect is pretty much zero: the use is for
debug and introspection, such as "lsgpio" and debugfs files.

However sometimes the user want this cuddly feeling of
listing all GPIO lines and seeing exactly what they are for
and it gives a very fulfilling sense of control. Especially
in the cases when the device tree node doesn't provide a
good name, or anonymous GPIO lines assigned just to
"gpios" in the device tree because the usage is implicit.

For these cases it may be nice to be able to label the
line directly and explicitly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/consumer.h