]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Input: gpio_keys[_polled] - change name of wakeup property
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Jul 2015 19:10:05 +0000 (12:10 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 Jul 2015 22:01:23 +0000 (15:01 -0700)
Wakeup property of device is not Linux-specific, it describes intended
system behavior regardless of the OS being used. Therefore let's drop
"linux," prefix, and, while at it, use the same name as I2C bus does:
"wakeup-source".

We keep parsing old name to keep compatibility with old DTSes.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/gpio-keys-polled.txt
Documentation/devicetree/bindings/input/gpio-keys.txt
drivers/input/keyboard/gpio_keys.c
drivers/input/keyboard/gpio_keys_polled.c

index 313abefa37ccd7dd74cc650d38cfc0babfe5f31b..5b91f5a3bd5c6aee02353423c3cdb8f56bd7bd22 100644 (file)
@@ -20,7 +20,7 @@ Optional subnode-properties:
          If not specified defaults to <1> == EV_KEY.
        - debounce-interval: Debouncing interval time in milliseconds.
          If not specified defaults to 5.
-       - gpio-key,wakeup: Boolean, button can wake-up the system.
+       - wakeup-source: Boolean, button can wake-up the system.
 
 Example nodes:
 
index 44b705767aca45ea1366c6e624f0515c8cb78b99..072bf7573c376ab3da5ab13d122d4f54d1a4f453 100644 (file)
@@ -23,7 +23,7 @@ Optional subnode-properties:
          If not specified defaults to <1> == EV_KEY.
        - debounce-interval: Debouncing interval time in milliseconds.
          If not specified defaults to 5.
-       - gpio-key,wakeup: Boolean, button can wake-up the system.
+       - wakeup-source: Boolean, button can wake-up the system.
        - linux,can-disable: Boolean, indicates that button is connected
          to dedicated (not shared) interrupt which can be disabled to
          suppress events from the button.
index ddf4045de08466210788ed583066b482e3951e38..1df4507c4c0b7076f1821da02e8458ad147324e0 100644 (file)
@@ -655,7 +655,9 @@ gpio_keys_get_devtree_pdata(struct device *dev)
                if (of_property_read_u32(pp, "linux,input-type", &button->type))
                        button->type = EV_KEY;
 
-               button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL);
+               button->wakeup = of_property_read_bool(pp, "wakeup-source") ||
+                                /* legacy name */
+                                of_property_read_bool(pp, "gpio-key,wakeup");
 
                button->can_disable = !!of_get_property(pp, "linux,can-disable", NULL);
 
index 097d7216d98ee4e4d394726e9d4c9743067d14f8..5a0c999506598f77cdac45aac8ff4782080c91e0 100644 (file)
@@ -152,7 +152,10 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
                                             &button->type))
                        button->type = EV_KEY;
 
-               button->wakeup = fwnode_property_present(child, "gpio-key,wakeup");
+               button->wakeup =
+                       fwnode_property_read_bool(child, "wakeup-source") ||
+                       /* legacy name */
+                       fwnode_property_read_bool(child, "gpio-key,wakeup");
 
                if (fwnode_property_read_u32(child, "debounce-interval",
                                             &button->debounce_interval))