Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338909 > unrolled thread

[PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants

Started byPali Rohár <pali.rohar@gmail.com>
First post2016-02-21 19:10 +0100
Last post2016-02-22 20:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants Pali Rohár <pali.rohar@gmail.com> - 2016-02-21 19:10 +0100
    Re: [PATCH] ARM: dts: n900: Use linux input defines instead  hardcoded constants Pavel Machek <pavel@ucw.cz> - 2016-02-22 12:00 +0100
      Re: [PATCH] ARM: dts: n900: Use linux input defines instead  hardcoded constants Tony Lindgren <tony@atomide.com> - 2016-02-22 20:10 +0100

#1338909 — [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants

FromPali Rohár <pali.rohar@gmail.com>
Date2016-02-21 19:10 +0100
Subject[PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants
Message-ID<r4GiS-12G-11@gated-at.bofh.it>
This makes DTS structure more readable.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 arch/arm/boot/dts/omap3-n900.dts |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index e0443cd..85c29f3 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -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>;
 		};
 	};
 
-- 
1.7.9.5

[toc] | [next] | [standalone]


#1339337 — Re: [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants

FromPavel Machek <pavel@ucw.cz>
Date2016-02-22 12:00 +0100
SubjectRe: [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants
Message-ID<r4WnD-4v7-7@gated-at.bofh.it>
In reply to#1338909
On Sun 2016-02-21 12:06:48, Pali Rohár wrote:
> This makes DTS structure more readable.
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [next] | [standalone]


#1339827 — Re: [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants

FromTony Lindgren <tony@atomide.com>
Date2016-02-22 20:10 +0100
SubjectRe: [PATCH] ARM: dts: n900: Use linux input defines instead hardcoded constants
Message-ID<r541P-1YW-3@gated-at.bofh.it>
In reply to#1339337
* Pavel Machek <pavel@ucw.cz> [160222 02:55]:
> On Sun 2016-02-21 12:06:48, Pali Rohár wrote:
> > This makes DTS structure more readable.
> > 
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>

Applying into omap-for-v4.6/dt.

Thanks,

Tony

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web