ARM: dts: n900: Use linux input defines instead hardcoded constants
PATCH 1/1 ARM: dts: n900: Use linux input defines instead hardcoded constants
This makes DTS structure more readable.
Signed-off-by Pali Rohár <[email protected]>
--- arch/arm/boot/dts/omap3-n900.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
arch/arm/boot/dts/omap3-n900.dts +9 -9
@@ -65,45 +65,45 @@ camera_lens_cover { label = "Camera Lens Cover"; gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* 110 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x09>; /* SW_CAMERA_LENS_COVER */ + linux,input-type = <EV_SW>; + linux,code = <SW_CAMERA_LENS_COVER>; wakeup-source; }; camera_focus { label = "Camera Focus"; gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; /* 68 */ - linux,code = <0x210>; /* KEY_CAMERA_FOCUS */ + linux,code = <KEY_CAMERA_FOCUS>; wakeup-source; }; camera_capture { label = "Camera Capture"; gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; /* 69 */ - linux,code = <0xd4>; /* KEY_CAMERA */ + linux,code = <KEY_CAMERA>; wakeup-source; }; lock_button { label = "Lock Button"; gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* 113 */ - linux,code = <0x98>; /* KEY_SCREENLOCK */ + linux,code = <KEY_SCREENLOCK>; wakeup-source; }; keypad_slide { label = "Keypad Slide"; gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; /* 71 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x0a>; /* SW_KEYPAD_SLIDE */ + linux,input-type = <EV_SW>; + linux,code = <SW_KEYPAD_SLIDE>; wakeup-source; }; proximity_sensor { label = "Proximity Sensor"; gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* 89 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x0b>; /* SW_FRONT_PROXIMITY */ + linux,input-type = <EV_SW>; + linux,code = <SW_FRONT_PROXIMITY>; }; };
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 56 lines · Pali Rohár
This makes DTS structure more readable.
Signed-off-by Pali Rohár <[email protected]>--- arch/arm/boot/dts/omap3-n900.dts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)arch/arm/boot/dts/omap3-n900.dts +7
-7@@ -65,45 +65,45 @@ camera_lens_cover { label = "Camera Lens Cover"; gpios = <&gpio4 14 GPIO_ACTIVE_LOW>; /* 110 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x09>; /* SW_CAMERA_LENS_COVER */ + linux,input-type = <EV_SW>; + linux,code = <SW_CAMERA_LENS_COVER>; wakeup-source; }; camera_focus { label = "Camera Focus"; gpios = <&gpio3 4 GPIO_ACTIVE_LOW>; /* 68 */ - linux,code = <0x210>; /* KEY_CAMERA_FOCUS */ + linux,code = <KEY_CAMERA_FOCUS>; wakeup-source; }; camera_capture { label = "Camera Capture"; gpios = <&gpio3 5 GPIO_ACTIVE_LOW>; /* 69 */ - linux,code = <0xd4>; /* KEY_CAMERA */ + linux,code = <KEY_CAMERA>; wakeup-source; }; lock_button { label = "Lock Button"; gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* 113 */ - linux,code = <0x98>; /* KEY_SCREENLOCK */ + linux,code = <KEY_SCREENLOCK>; wakeup-source; }; keypad_slide { label = "Keypad Slide"; gpios = <&gpio3 7 GPIO_ACTIVE_LOW>; /* 71 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x0a>; /* SW_KEYPAD_SLIDE */ + linux,input-type = <EV_SW>; + linux,code = <SW_KEYPAD_SLIDE>; wakeup-source; };
arch/arm/boot/dts/omap3-n900.dts line 109
Quoted 10 lines
arch/arm/boot/dts/omap3-n900.dts +2
-2proximity_sensor { label = "Proximity Sensor"; gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>; /* 89 */ - linux,input-type = <5>; /* EV_SW */ - linux,code = <0x0b>; /* SW_FRONT_PROXIMITY */ + linux,input-type = <EV_SW>; + linux,code = <SW_FRONT_PROXIMITY>; }; };
-- Sebastian
Quoted 3 lines · Pali Rohár
This makes DTS structure more readable.
Signed-off-by Pali Rohár <[email protected]>
Acked-by Pavel Machek <[email protected]>
Signature · 6 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Pavel Machek
Quoted 3 lines · Pali Rohár
This makes DTS structure more readable.
Signed-off-by Pali Rohár <[email protected]>Acked-by Pavel Machek <[email protected]>
Applying into omap-for-v4.6/dt.
Thanks,
Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html