summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2016-10-21 17:21:32 +0300
committerLinus Walleij <linus.walleij@linaro.org>2016-10-24 16:33:11 +0200
commit4035cc15b99f4f4a4e29081b82aca010137e33da (patch)
tree763f6b5ed713deb78cd277704fb6ba02f82d1fd4 /drivers/gpio
parent9427ecbed46cc8425338084ae42ce8749566586f (diff)
downloadlinux-0-day-4035cc15b99f4f4a4e29081b82aca010137e33da.tar.gz
linux-0-day-4035cc15b99f4f4a4e29081b82aca010137e33da.tar.xz
ACPI / gpio: Add support for naming GPIOs
Now that we have the new helper function that sets nice names for GPIO lines based on "gpio-line-names" device property, we can take advantage of this in acpi_gpiochip_add(). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib-acpi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 4f46982ce982f..53266ef120086 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -957,6 +957,9 @@ void acpi_gpiochip_add(struct gpio_chip *chip)
return;
}
+ if (!chip->names)
+ devprop_gpiochip_set_names(chip);
+
acpi_gpiochip_request_regions(acpi_gpio);
acpi_gpiochip_scan_gpios(acpi_gpio);
acpi_walk_dep_device_list(handle);