mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-14 09:25:12 +00:00
Input: pmic8xxx-keypad - change name of wakeup property
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>
This commit is contained in:
parent
abf77a3228
commit
2746965212
@ -33,7 +33,7 @@ PROPERTIES
|
|||||||
Value type: <bool>
|
Value type: <bool>
|
||||||
Definition: don't enable autorepeat feature.
|
Definition: don't enable autorepeat feature.
|
||||||
|
|
||||||
- linux,keypad-wakeup:
|
- wakeup-source:
|
||||||
Usage: optional
|
Usage: optional
|
||||||
Value type: <bool>
|
Value type: <bool>
|
||||||
Definition: use any event on keypad as wakeup event.
|
Definition: use any event on keypad as wakeup event.
|
||||||
|
@ -507,6 +507,7 @@ static void pmic8xxx_kp_close(struct input_dev *dev)
|
|||||||
*/
|
*/
|
||||||
static int pmic8xxx_kp_probe(struct platform_device *pdev)
|
static int pmic8xxx_kp_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
struct device_node *np = pdev->dev.of_node;
|
||||||
unsigned int rows, cols;
|
unsigned int rows, cols;
|
||||||
bool repeat;
|
bool repeat;
|
||||||
bool wakeup;
|
bool wakeup;
|
||||||
@ -524,10 +525,11 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
repeat = !of_property_read_bool(pdev->dev.of_node,
|
repeat = !of_property_read_bool(np, "linux,input-no-autorepeat");
|
||||||
"linux,input-no-autorepeat");
|
|
||||||
wakeup = of_property_read_bool(pdev->dev.of_node,
|
wakeup = of_property_read_bool(np, "wakeup-source") ||
|
||||||
"linux,keypad-wakeup");
|
/* legacy name */
|
||||||
|
of_property_read_bool(np, "linux,keypad-wakeup");
|
||||||
|
|
||||||
kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL);
|
kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL);
|
||||||
if (!kp)
|
if (!kp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user