OSDN Git Service

gpiolib: allow line names from device props to override driver names
authorPeter Rosin <peda@axentia.se>
Tue, 14 Dec 2021 21:59:56 +0000 (22:59 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Fri, 17 Dec 2021 11:26:14 +0000 (12:26 +0100)
commitc73960bb0a4320b9ed0d5f202fa0a2bc7373c214
tree4a93a59ecba42ebdbbd586273930902aacfa1594
parent36ccddf80e56b8c51604bafd449522a5271bfd35
gpiolib: allow line names from device props to override driver names

Some GPIO providers set names for GPIO lines that match the names of
the pins on the SoC, or variations on that theme. These names are
generic more often that not, such as pioC12 in the at91 case. These
generic names block the possibility to set more useful GPIO line
names with device properties (i.e. gpio-line-names).

Allow overriding a generic name given by the GPIO driver if there is
a name given to the GPIO line using device properties, but leave the
generic name alone if no better name is available.

However, there is a risk. If user space is depending on the above
mentioned fixed GPIO names, AND there are device properties that
previously did not reach the surface, the name change might cause
regressions. But hopefully this stays below the radar...

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib.c