ARM: dts: imx53-smd: Do not hardcode input codes
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 10 May 2018 02:08:08 +0000 (23:08 -0300)
committerShawn Guo <shawnguo@kernel.org>
Mon, 14 May 2018 14:08:07 +0000 (22:08 +0800)
Instead of hardcoding the input codes we can use the symbol name for
better readability.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/imx53-smd.dts

index fd030128666c7ab602d305e608b205f0b678008a..705af5e84d2674ac238a2ef8753b81bd9d524505 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/input/input.h>
 #include "imx53.dtsi"
 
 / {
                volume-up {
                        label = "Volume Up";
                        gpios = <&gpio2 14 0>;
-                       linux,code = <115>; /* KEY_VOLUMEUP */
+                       linux,code = <KEY_VOLUMEUP>;
                };
 
                volume-down {
                        label = "Volume Down";
                        gpios = <&gpio2 15 0>;
-                       linux,code = <114>; /* KEY_VOLUMEDOWN */
+                       linux,code = <KEY_VOLUMEDOWN>;
                };
        };
 };