]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
input: gpio-keys: parse input-name from dt
authorVinayak Pane <vpane@nvidia.com>
Tue, 25 Mar 2014 19:41:57 +0000 (12:41 -0700)
committerMrutyunjay Sawant <msawant@nvidia.com>
Wed, 26 Mar 2014 14:16:37 +0000 (07:16 -0700)
Accept input-name from devtree.

Bug 1449481

Change-Id: Icdc5cb82485a40f55895c49854bebcc6e38c7799
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/386485
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Documentation/devicetree/bindings/gpio/gpio_keys.txt
drivers/input/keyboard/gpio_keys.c

index 5c2c02140a62dac132566aaeb4f6156b46233f41..baa4e703241ef3047b87499b1cc8575db49d6e8d 100644 (file)
@@ -6,6 +6,7 @@ Required properties:
 Optional properties:
        - autorepeat: Boolean, Enable auto repeat feature of Linux input
          subsystem.
+       - input-name: String, Input device name "/sys/class/input/inputX/name"
 
 Each button (key) is represented as a sub-node of "gpio-keys":
 Subnode properties:
@@ -28,6 +29,7 @@ Example nodes:
                        #address-cells = <1>;
                        #size-cells = <0>;
                        autorepeat;
+                       input-name = "gpio-keys";
                        button@21 {
                                label = "GPIO Key UP";
                                linux,code = <103>;
index 13d80878362e0c068efe17bc9a4cccada532ed93..d86b4d459357a6f314011fb71d0f03a55049a16d 100644 (file)
@@ -614,6 +614,7 @@ gpio_keys_get_devtree_pdata(struct device *dev)
        pdata->nbuttons = nbuttons;
 
        pdata->rep = !!of_get_property(node, "autorepeat", NULL);
+       pdata->name = of_get_property(node, "input-name", NULL);
 
        i = 0;
        for_each_child_of_node(node, pp) {