Input: pmic8xxx-keypad - change name of wakeup property
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 16 Jul 2015 19:15:24 +0000 (12:15 -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.

Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
drivers/input/keyboard/pmic8xxx-keypad.c

index 7d8cb92831d7b762288f5dea2a6b754db95cfaa9..ee6215681182850d19d255fe7fce85f6bd1461c7 100644 (file)
@@ -33,7 +33,7 @@ PROPERTIES
        Value type: <bool>
        Definition: don't enable autorepeat feature.
 
-- linux,keypad-wakeup:
+- wakeup-source:
        Usage: optional
        Value type: <bool>
        Definition: use any event on keypad as wakeup event.
index 32580afecc2668b6d20993d691e8754e393215b1..5c68e3f096bc83fce073f6ff7dfafe65fe7e8f56 100644 (file)
@@ -507,6 +507,7 @@ static void pmic8xxx_kp_close(struct input_dev *dev)
  */
 static int pmic8xxx_kp_probe(struct platform_device *pdev)
 {
+       struct device_node *np = pdev->dev.of_node;
        unsigned int rows, cols;
        bool repeat;
        bool wakeup;
@@ -524,10 +525,11 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       repeat = !of_property_read_bool(pdev->dev.of_node,
-                                       "linux,input-no-autorepeat");
-       wakeup = of_property_read_bool(pdev->dev.of_node,
-                                       "linux,keypad-wakeup");
+       repeat = !of_property_read_bool(np, "linux,input-no-autorepeat");
+
+       wakeup = of_property_read_bool(np, "wakeup-source") ||
+                /* legacy name */
+                of_property_read_bool(np, "linux,keypad-wakeup");
 
        kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL);
        if (!kp)