[PATCH 2/3] ARM: dts: imx53-smd: Do not hardcode input codes
Fabio Estevam
festevam at gmail.com
Wed May 9 19:08:08 PDT 2018
From: Fabio Estevam <fabio.estevam at nxp.com>
Instead of hardcoding the input codes we can use the symbol name for
better readability.
Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
arch/arm/boot/dts/imx53-smd.dts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx53-smd.dts b/arch/arm/boot/dts/imx53-smd.dts
index fd03012..705af5e 100644
--- a/arch/arm/boot/dts/imx53-smd.dts
+++ b/arch/arm/boot/dts/imx53-smd.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/input/input.h>
#include "imx53.dtsi"
/ {
@@ -27,13 +28,13 @@
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>;
};
};
};
--
2.7.4
More information about the linux-arm-kernel
mailing list