summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-01-12 22:56:40 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-01-13 00:18:05 -0800
commitc4dc5f8c953f23d45329abc8b8e04f0c1e314a75 (patch)
tree75884e1e5d4b786acbfe64cb91b6f3f9f426506e /drivers/input/keyboard
parent85c017f2f1a6ae213b08c9d694202df8c912c614 (diff)
downloadlinux-c4dc5f8c953f23d45329abc8b8e04f0c1e314a75.tar.gz
Input: gpio-keys - allow setting input device name in DT
Allow specifying name if input device via device tree property. This helps userspace code to get name and perform proper event to key mapping in some cases (for example, on Android). Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/gpio_keys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index b9f01bd1b7ef..671cdc9a6aea 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -645,6 +645,8 @@ gpio_keys_get_devtree_pdata(struct device *dev)
pdata->rep = !!of_get_property(node, "autorepeat", NULL);
+ of_property_read_string(node, "label", &pdata->name);
+
i = 0;
for_each_child_of_node(node, pp) {
enum of_gpio_flags flags;