ARM: dts: imx53-ard: Do not hardcode input codes
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/3 ARM: dts: imx53-ard: Do not hardcode input codes
From: Fabio Estevam <[email protected]>
Instead of hardcoding the input codes we can use the symbol name for better readability.
--- arch/arm/boot/dts/imx53-ard.dts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
arch/arm/boot/dts/imx53-ard.dts +6 -5
@@ -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>; }; }; };
Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH 2/3 ARM: dts: imx53-smd: Do not hardcode input codes
From: Fabio Estevam <[email protected]>
Instead of hardcoding the input codes we can use the symbol name for better readability.
--- arch/arm/boot/dts/imx53-smd.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx53-smd.dts +3 -2
@@ -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>; }; }; };
Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH 3/3 ARM: dts: imx6q-gk802: Do not hardcode input codes
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Instead of hardcoding the input codes we can use the symbol name for better readability.
--- arch/arm/boot/dts/imx6q-gk802.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6q-gk802.dts +2 -1
@@ -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; }; };
Signature · 1 line
2.7.4
Shawn Guo
AppliedPATCH 1/3 ARM: dts: imx53-ard: Do not hardcode input codes
In reply to Fabio EstevamQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Instead of hardcoding the input codes we can use the symbol name for better readability.
Signed-off-by Fabio Estevam <[email protected]>
Applied all, thanks.