Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4dc5f8c authored by Laxman Dewangan's avatar Laxman Dewangan Committed by Dmitry Torokhov
Browse files

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: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 85c017f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ Required properties:
Optional properties:
	- autorepeat: Boolean, Enable auto repeat feature of Linux input
	  subsystem.
	- label: String, name of the input device.

Each button (key) is represented as a sub-node of "gpio-keys":
Subnode properties:
+2 −0
Original line number Diff line number Diff line
@@ -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;