* [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes
@ 2018-05-10 2:08 Fabio Estevam
2018-05-10 2:08 ` [PATCH 2/3] ARM: dts: imx53-smd: " Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-05-10 2:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@nxp.com>
Instead of hardcoding the input codes we can use the symbol name for
better readability.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
arch/arm/boot/dts/imx53-ard.dts | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/imx53-ard.dts b/arch/arm/boot/dts/imx53-ard.dts
index 80fc007..117bd00 100644
--- a/arch/arm/boot/dts/imx53-ard.dts
+++ b/arch/arm/boot/dts/imx53-ard.dts
@@ -11,6 +11,7 @@
*/
/dts-v1/;
+#include <dt-bindings/input/input.h>
#include "imx53.dtsi"
/ {
@@ -68,34 +69,34 @@
home {
label = "Home";
gpios = <&gpio5 10 0>;
- linux,code = <102>; /* KEY_HOME */
+ linux,code = <KEY_HOME>;
wakeup-source;
};
back {
label = "Back";
gpios = <&gpio5 11 0>;
- linux,code = <158>; /* KEY_BACK */
+ linux,code = <KEY_BACK>;
wakeup-source;
};
program {
label = "Program";
gpios = <&gpio5 12 0>;
- linux,code = <362>; /* KEY_PROGRAM */
+ linux,code = <KEY_PROGRAM >;
wakeup-source;
};
volume-up {
label = "Volume Up";
gpios = <&gpio5 13 0>;
- linux,code = <115>; /* KEY_VOLUMEUP */
+ linux,code = <KEY_VOLUMEUP>;
};
volume-down {
label = "Volume Down";
gpios = <&gpio4 0 0>;
- linux,code = <114>; /* KEY_VOLUMEDOWN */
+ linux,code = <KEY_VOLUMEDOWN>;
};
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ARM: dts: imx53-smd: Do not hardcode input codes
2018-05-10 2:08 [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes Fabio Estevam
@ 2018-05-10 2:08 ` Fabio Estevam
2018-05-10 2:08 ` [PATCH 3/3] ARM: dts: imx6q-gk802: " Fabio Estevam
2018-05-11 8:51 ` [PATCH 1/3] ARM: dts: imx53-ard: " Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-05-10 2:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@nxp.com>
Instead of hardcoding the input codes we can use the symbol name for
better readability.
Signed-off-by: Fabio Estevam <fabio.estevam@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ARM: dts: imx6q-gk802: Do not hardcode input codes
2018-05-10 2:08 [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes Fabio Estevam
2018-05-10 2:08 ` [PATCH 2/3] ARM: dts: imx53-smd: " Fabio Estevam
@ 2018-05-10 2:08 ` Fabio Estevam
2018-05-11 8:51 ` [PATCH 1/3] ARM: dts: imx53-ard: " Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2018-05-10 2:08 UTC (permalink / raw)
To: linux-arm-kernel
From: Fabio Estevam <fabio.estevam@nxp.com>
Instead of hardcoding the input codes we can use the symbol name for
better readability.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
arch/arm/boot/dts/imx6q-gk802.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx6q-gk802.dts b/arch/arm/boot/dts/imx6q-gk802.dts
index 0be3756..84d3540 100644
--- a/arch/arm/boot/dts/imx6q-gk802.dts
+++ b/arch/arm/boot/dts/imx6q-gk802.dts
@@ -8,6 +8,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
#include "imx6q.dtsi"
/ {
@@ -43,7 +44,7 @@
recovery-button {
label = "recovery";
gpios = <&gpio3 16 1>;
- linux,code = <0x198>; /* KEY_RESTART */
+ linux,code = <KEY_RESTART>;
wakeup-source;
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes
2018-05-10 2:08 [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes Fabio Estevam
2018-05-10 2:08 ` [PATCH 2/3] ARM: dts: imx53-smd: " Fabio Estevam
2018-05-10 2:08 ` [PATCH 3/3] ARM: dts: imx6q-gk802: " Fabio Estevam
@ 2018-05-11 8:51 ` Shawn Guo
2 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2018-05-11 8:51 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, May 09, 2018 at 11:08:07PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> Instead of hardcoding the input codes we can use the symbol name for
> better readability.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Applied all, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-11 8:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-10 2:08 [PATCH 1/3] ARM: dts: imx53-ard: Do not hardcode input codes Fabio Estevam
2018-05-10 2:08 ` [PATCH 2/3] ARM: dts: imx53-smd: " Fabio Estevam
2018-05-10 2:08 ` [PATCH 3/3] ARM: dts: imx6q-gk802: " Fabio Estevam
2018-05-11 8:51 ` [PATCH 1/3] ARM: dts: imx53-ard: " Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).