]> git.baikalelectronics.ru Git - uboot.git/commitdiff
dts: add missing linux,code in gpio-keys
authorDzmitry Sankouski <dsankouski@gmail.com>
Sun, 22 Jan 2023 15:21:22 +0000 (18:21 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 10 Feb 2023 17:50:01 +0000 (12:50 -0500)
gpio-keys linux driver enforces user to specify linux,code.
Add missing linux,code before implementing button input support.

- arch/arm/dts/rk3288-popmetal.dtsi -> KEY_POWER
- arch/arm/dts/rk3288-tinker.dtsi -> KEY_POWER
- arch/arm/dts/am3517-evm-ui.dtsi -> KEY_RECORD
- sandbox/dts/sandbox.dtsi -> BTN_1
- sandbox/dts/sandbox.dts -> BTN_1

Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/am3517-evm-ui.dtsi
arch/arm/dts/imx6ul-phytec-segin-peb-eval-01.dtsi
arch/arm/dts/rk3288-popmetal.dtsi
arch/arm/dts/rk3288-tinker.dtsi
arch/sandbox/dts/sandbox.dtsi

index 7d8f32bf70db2c632713931ed4aff6d987fe9178..340e68178ce64491f8736209c499eb624272c885 100644 (file)
@@ -72,7 +72,7 @@
 
                record {
                        label = "Record";
-                       /* linux,code = <BTN_0>; */
+                       linux,code = <KEY_RECORD>;
                        gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
                };
 
index 2f3fd32a116795ada43a78d967704fa988f7ba3a..5f760ed69878eed6ec2ad352297da4b8ef95b53b 100644 (file)
@@ -8,7 +8,7 @@
 
 / {
        gpio_keys: gpio-keys {
-               compatible = "gpio-key";
+               compatible = "gpio-keys";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_gpio_keys>;
                status = "disabled";
index 63785eb55eff07dc0573b5581e9e3fd8d4ae55c8..0253933a117046e7728531e6bf7f5240dfac4330 100644 (file)
@@ -38,6 +38,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/input/input.h>
 #include "rk3288.dtsi"
 
 / {
@@ -63,6 +64,7 @@
                power {
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
                        label = "GPIO Key Power";
+                       linux,code = <KEY_POWER>;
                        linux,input-type = <1>;
                        wakeup-source;
                        debounce-interval = <100>;
index 2f816af47f166cbceb1149fcb0427663f50d950d..46460ae455e239e7fa017d0b05f07c6a2a20858e 100644 (file)
@@ -38,6 +38,7 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 
+#include <dt-bindings/input/input.h>
 #include "rk3288.dtsi"
 
 / {
@@ -63,6 +64,7 @@
                button@0 {
                        gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
                        label = "GPIO Key Power";
+                       linux,code = <KEY_POWER>;
                        linux,input-type = <1>;
                        gpio-key,wakeup = <1>;
                        debounce-interval = <100>;
index 18bf1cb5b699f8e68436604a13f7b4f4889092b3..7e7fcff6d28c0ff430af3c49475e180751e29c11 100644 (file)
@@ -4,6 +4,8 @@
  * and sandbox64 builds.
  */
 
+#include <dt-bindings/input/input.h>
+
 #define USB_CLASS_HUB                  9
 
 / {
                btn1 {
                        gpios = <&gpio_a 3 0>;
                        label = "button1";
+                   linux,code = <BTN_1>;
                };
 
                btn2 {
                        gpios = <&gpio_a 4 0>;
                        label = "button2";
+                   linux,code = <BTN_2>;
                };
        };