Input: matrix_keypad - change name of wakeup property to "wakeup-source"
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Jul 2015 18:54:14 +0000 (11:54 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 Jul 2015 22:01:22 +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.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
drivers/input/keyboard/matrix_keypad.c

index ead641c65e0a8d728466b5138052c80b2a342a5a..4d86059c370c466a143d87fd6e6b183b5c132fc6 100644 (file)
@@ -19,7 +19,7 @@ Required Properties:
 
 Optional Properties:
 - linux,no-autorepeat: do no enable autorepeat feature.
-- linux,wakeup:                use any event on keypad as wakeup event.
+- wakeup-source:       use any event on keypad as wakeup event.
 - debounce-delay-ms:   debounce interval in milliseconds
 - col-scan-delay-us:   delay, measured in microseconds, that is needed
                        before we can scan keypad after activating column gpio
index b370a59cb759732cba58b293a4eda1226b86666f..7f12b6579f822d48add2f6f42ab7f8a1ad068d11 100644 (file)
@@ -425,8 +425,10 @@ matrix_keypad_parse_dt(struct device *dev)
 
        if (of_get_property(np, "linux,no-autorepeat", NULL))
                pdata->no_autorepeat = true;
-       if (of_get_property(np, "linux,wakeup", NULL))
-               pdata->wakeup = true;
+
+       pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
+                       of_property_read_bool(np, "linux,wakeup"); /* legacy */
+
        if (of_get_property(np, "gpio-activelow", NULL))
                pdata->active_low = true;