Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: gpio_keys[_polled] - 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.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

+9 -4
+1 -1
Documentation/devicetree/bindings/input/gpio-keys-polled.txt
··· 20 20 If not specified defaults to <1> == EV_KEY. 21 21 - debounce-interval: Debouncing interval time in milliseconds. 22 22 If not specified defaults to 5. 23 - - gpio-key,wakeup: Boolean, button can wake-up the system. 23 + - wakeup-source: Boolean, button can wake-up the system. 24 24 25 25 Example nodes: 26 26
+1 -1
Documentation/devicetree/bindings/input/gpio-keys.txt
··· 23 23 If not specified defaults to <1> == EV_KEY. 24 24 - debounce-interval: Debouncing interval time in milliseconds. 25 25 If not specified defaults to 5. 26 - - gpio-key,wakeup: Boolean, button can wake-up the system. 26 + - wakeup-source: Boolean, button can wake-up the system. 27 27 - linux,can-disable: Boolean, indicates that button is connected 28 28 to dedicated (not shared) interrupt which can be disabled to 29 29 suppress events from the button.
+3 -1
drivers/input/keyboard/gpio_keys.c
··· 655 655 if (of_property_read_u32(pp, "linux,input-type", &button->type)) 656 656 button->type = EV_KEY; 657 657 658 - button->wakeup = !!of_get_property(pp, "gpio-key,wakeup", NULL); 658 + button->wakeup = of_property_read_bool(pp, "wakeup-source") || 659 + /* legacy name */ 660 + of_property_read_bool(pp, "gpio-key,wakeup"); 659 661 660 662 button->can_disable = !!of_get_property(pp, "linux,can-disable", NULL); 661 663
+4 -1
drivers/input/keyboard/gpio_keys_polled.c
··· 152 152 &button->type)) 153 153 button->type = EV_KEY; 154 154 155 - button->wakeup = fwnode_property_present(child, "gpio-key,wakeup"); 155 + button->wakeup = 156 + fwnode_property_read_bool(child, "wakeup-source") || 157 + /* legacy name */ 158 + fwnode_property_read_bool(child, "gpio-key,wakeup"); 156 159 157 160 if (fwnode_property_read_u32(child, "debounce-interval", 158 161 &button->debounce_interval))