summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@systec-electronic.com>2017-01-12 17:39:24 +0100
committerLinus Walleij <linus.walleij@linaro.org>2017-01-26 09:59:52 +0100
commitb2987d7438e0ca949d81774ca8b43d370a1f9947 (patch)
tree21fb2c0cfb36fed138bc1660e0de75cb017c9b13 /drivers/input/keyboard
parenta264d10ff45c688293d9112fddd8d29c819e0853 (diff)
downloadlinux-b2987d7438e0ca949d81774ca8b43d370a1f9947.tar.gz
linux-b2987d7438e0ca949d81774ca8b43d370a1f9947.tar.bz2
linux-b2987d7438e0ca949d81774ca8b43d370a1f9947.zip
gpio: Pass GPIO label down to gpiod_request
Currently all users of fwnode_get_named_gpiod() have no way to specify a label for the GPIO. So GPIOs listed in debugfs are shown with label "?". With this change a proper label is used. Also adjust all users so they can pass a label, properly retrieved from device tree properties. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/gpio_keys.c3
-rw-r--r--drivers/input/keyboard/gpio_keys_polled.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 9de4b876100a..2ec74d90ef78 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -481,7 +481,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
spin_lock_init(&bdata->lock);
if (child) {
- bdata->gpiod = devm_get_gpiod_from_child(dev, NULL, child, GPIOD_IN);
+ bdata->gpiod = devm_get_gpiod_from_child(dev, NULL, child,
+ GPIOD_IN, desc);
if (IS_ERR(bdata->gpiod)) {
error = PTR_ERR(bdata->gpiod);
if (error == -ENOENT) {
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index fd7ab4dad87b..5e35c565e341 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -305,7 +305,8 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)
bdata->gpiod = devm_get_gpiod_from_child(dev, NULL,
child,
- GPIOD_IN);
+ GPIOD_IN,
+ button->desc);
if (IS_ERR(bdata->gpiod)) {
error = PTR_ERR(bdata->gpiod);
if (error != -EPROBE_DEFER)