]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: samsung-keypad - change name of wakeup property
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Jul 2015 00:04:10 +0000 (17:04 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 24 Jul 2015 00:34:02 +0000 (17:34 -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.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/samsung-keypad.txt
drivers/input/keyboard/samsung-keypad.c

index 942d071baaa5da93303785e4d6edc38cc86a5536..863e77f619dc6871cbf5dd6792daf38febcdfdaa 100644 (file)
@@ -36,9 +36,11 @@ Required Board Specific Properties:
 - pinctrl-0: Should specify pin control groups used for this controller.
 - pinctrl-names: Should contain only one value - "default".
 
+Optional Properties:
+- wakeup-source: use any event on keypad as wakeup event.
+
 Optional Properties specific to linux:
 - linux,keypad-no-autorepeat: do no enable autorepeat feature.
-- linux,keypad-wakeup: use any event on keypad as wakeup event.
 
 
 Example:
index 43e48dac7687f293bacf3a83831ec28127b97307..4e319eb9e19d9f75a67d7c2123cc3bf5550c86ad 100644 (file)
@@ -299,8 +299,10 @@ samsung_keypad_parse_dt(struct device *dev)
        if (of_get_property(np, "linux,input-no-autorepeat", NULL))
                pdata->no_autorepeat = true;
 
-       if (of_get_property(np, "linux,input-wakeup", NULL))
-               pdata->wakeup = true;
+       pdata->wakeup = of_property_read_bool(np, "wakeup-source") ||
+                       /* legacy name */
+                       of_property_read_bool(np, "linux,input-wakeup");
+
 
        return pdata;
 }