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>
This commit is contained in:

committed by
Dmitry Torokhov

parent
85c017f2f1
commit
c4dc5f8c95
@@ -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;
|
||||
|
Reference in New Issue
Block a user