ARM: dts: gemini: Map reset keys to KEY_RESTART
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 11 Feb 2024 21:24:25 +0000 (22:24 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 21 Feb 2024 13:22:53 +0000 (14:22 +0100)
This maps the misc "reset", "setup" and "facory reset" keys to the
only key a standard userspace is likely to understand: KEY_RESTART.
On OpenWrt this will simply restart the system under controlled
forms.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240211-gemini-dts-v1-3-6c09adeb4c2e@linaro.org
arch/arm/boot/dts/gemini/gemini-dlink-dir-685.dts
arch/arm/boot/dts/gemini/gemini-dlink-dns-313.dts
arch/arm/boot/dts/gemini/gemini-sl93512r.dts
arch/arm/boot/dts/gemini/gemini-sq201.dts
arch/arm/boot/dts/gemini/gemini-wbd111.dts
arch/arm/boot/dts/gemini/gemini-wbd222.dts

index 30c931415680c6da4153aff295ff93da45ae55fc..b4dbcf8f168ef1e7025be988fb6238d1e3bd35bd 100644 (file)
        gpio_keys {
                compatible = "gpio-keys";
 
-               button-esc {
+               button-reset {
                        debounce-interval = <100>;
                        wakeup-source;
-                       linux,code = <KEY_ESC>;
+                       linux,code = <KEY_RESTART>;
                        label = "reset";
                        /* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
                        gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
index 138c47e1ac1b1dee69caba7009adb486b8339715..8c54d3a5a721728c3250775dc1bd6e078cfffcca 100644 (file)
        gpio_keys {
                compatible = "gpio-keys";
 
-               button-esc {
+               button-reset {
                        debounce-interval = <100>;
                        wakeup-source;
-                       linux,code = <KEY_ESC>;
+                       linux,code = <KEY_RESTART>;
                        label = "reset";
                        gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
                };
index 91c19e8ebfe8b7810fd2e28fd15016cc43d40b59..be06a3815e3afe4114d5a5296bf9a70287e226ed 100644 (file)
@@ -43,7 +43,7 @@
                button-setup {
                        debounce-interval = <50>;
                        wakeup-source;
-                       linux,code = <KEY_SETUP>;
+                       linux,code = <KEY_RESTART>;
                        label = "factory reset";
                        /* Conflict with NAND flash */
                        gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
index d0efd76695da6e80b402d0af6baf1cf362c5651a..05ef8b80f10498436fda9689b0a58791d32b28bf 100644 (file)
@@ -30,7 +30,7 @@
                button-setup {
                        debounce-interval = <100>;
                        wakeup-source;
-                       linux,code = <KEY_SETUP>;
+                       linux,code = <KEY_RESTART>;
                        label = "factory reset";
                        /* Conflict with NAND flash */
                        gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
index d4038930c70fd1738cea58faec4944722c082015..6a0c89e0c9184b3f68248e23b29610dfcdac519f 100644 (file)
        gpio_keys {
                compatible = "gpio-keys";
 
-               button-setup {
+               button-reset {
                        debounce-interval = <100>;
                        wakeup-source;
-                       linux,code = <KEY_SETUP>;
+                       linux,code = <KEY_RESTART>;
                        label = "reset";
                        /* Conflict with ICE */
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
index a503bcff5f4ab97f6b1ac40329c01011620c610d..d8b34ebad4b05607d9c402a7762943b2b0977af1 100644 (file)
        gpio_keys {
                compatible = "gpio-keys";
 
-               button-setup {
+               button-reset {
                        debounce-interval = <100>;
                        wakeup-source;
-                       linux,code = <KEY_SETUP>;
+                       linux,code = <KEY_RESTART>;
                        label = "reset";
                        /* Conflict with ICE */
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;