diff mbox

[1/2] ARM: DT: Kirkwood: Use symbolic names from input.h

Message ID 1386100305-31280-1-git-send-email-andrew@lunn.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Lunn Dec. 3, 2013, 7:51 p.m. UTC
Replace the numeric key value with a symbolic name from
<bt-bindings/input/input.h>

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
 arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
 arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
 arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
 arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
 arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
 arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
 arch/arm/boot/dts/kirkwood-ns2-common.dtsi             | 2 +-
 arch/arm/boot/dts/kirkwood-nsa310.dts                  | 6 +++---
 arch/arm/boot/dts/kirkwood-nsa310a.dts                 | 6 +++---
 arch/arm/boot/dts/kirkwood-openblocks_a6.dts           | 2 +-
 arch/arm/boot/dts/kirkwood-openblocks_a7.dts           | 2 +-
 arch/arm/boot/dts/kirkwood-ts219-6281.dts              | 4 ++--
 arch/arm/boot/dts/kirkwood-ts219-6282.dts              | 4 ++--
 arch/arm/boot/dts/kirkwood.dtsi                        | 1 +
 16 files changed, 33 insertions(+), 32 deletions(-)

Comments

Arnaud Ebalard Dec. 3, 2013, 8:39 p.m. UTC | #1
Hi Andrew,

Andrew Lunn <andrew@lunn.ch> writes:

> Replace the numeric key value with a symbolic name from
> <bt-bindings/input/input.h>
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
>  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
>  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
>  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
>  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
>  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
>  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---

Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
key values with a symbolic name. And it also does the same for GPIO
voltage level. I guess you can remove that specific .dts from your patch.

Just in case you have the same in preparation for armada .dts files,
RN102 and RN104 .dts files are also fixed in mvebu/dt.

Anyway, thanks for that work.

Cheers,

a+
Jason Cooper Dec. 3, 2013, 9:14 p.m. UTC | #2
Andrew,

On Tue, Dec 03, 2013 at 09:39:02PM +0100, Arnaud Ebalard wrote:
> Hi Andrew,
> 
> Andrew Lunn <andrew@lunn.ch> writes:
> 
> > Replace the numeric key value with a symbolic name from
> > <bt-bindings/input/input.h>
> >
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
> >  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
> >  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
> >  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
> >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
> >  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
> >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
> >  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
> 
> Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
> cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
> key values with a symbolic name. And it also does the same for GPIO
> voltage level. I guess you can remove that specific .dts from your patch.
> 
> Just in case you have the same in preparation for armada .dts files,
> RN102 and RN104 .dts files are also fixed in mvebu/dt.
> 
> Anyway, thanks for that work.

Yes, it feels like someone was looking over my shoulder at my TODO list
;-)  Anyway, I'll wait for a v2 before applying.

thx,

Jason.
Andrew Lunn Dec. 3, 2013, 9:50 p.m. UTC | #3
On Tue, Dec 03, 2013 at 09:39:02PM +0100, Arnaud Ebalard wrote:
> Hi Andrew,
> 
> Andrew Lunn <andrew@lunn.ch> writes:
> 
> > Replace the numeric key value with a symbolic name from
> > <bt-bindings/input/input.h>
> >
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
> >  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
> >  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
> >  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
> >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
> >  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
> >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
> >  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
> 
> Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
> cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
> key values with a symbolic name. And it also does the same for GPIO
> voltage level. I guess you can remove that specific .dts from your patch.

I sore your patches. I did it slightly different to you, in that i've
the includes in the top level kirkwood.dtsi file, where as you put
them into the .dts files. That makes yours redundant, if we keep to
this scheme.

Jason, which do you prefer, includes in every .dts file, or once in
kirkwood.dtsi. 

> Just in case you have the same in preparation for armada .dts files,
> RN102 and RN104 .dts files are also fixed in mvebu/dt.

I've nothing for those files.

     Andrew
Jason Cooper Dec. 3, 2013, 9:56 p.m. UTC | #4
On Tue, Dec 03, 2013 at 10:50:05PM +0100, Andrew Lunn wrote:
> On Tue, Dec 03, 2013 at 09:39:02PM +0100, Arnaud Ebalard wrote:
> > Hi Andrew,
> > 
> > Andrew Lunn <andrew@lunn.ch> writes:
> > 
> > > Replace the numeric key value with a symbolic name from
> > > <bt-bindings/input/input.h>
> > >
> > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > ---
> > >  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
> > >  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
> > >  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
> > >  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
> > >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
> > >  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
> > >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
> > >  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
> > 
> > Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
> > cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
> > key values with a symbolic name. And it also does the same for GPIO
> > voltage level. I guess you can remove that specific .dts from your patch.
> 
> I sore your patches. I did it slightly different to you, in that i've
> the includes in the top level kirkwood.dtsi file, where as you put
> them into the .dts files. That makes yours redundant, if we keep to
> this scheme.
> 
> Jason, which do you prefer, includes in every .dts file, or once in
> kirkwood.dtsi. 

I prefer the kernel standard (is it really?) for includes.  Which is
directly in the file needing it.  So, that would mean in both if we use
the macros in both.

thx,

Jason.
Andrew Lunn Dec. 3, 2013, 10:28 p.m. UTC | #5
On Tue, Dec 03, 2013 at 04:56:33PM -0500, Jason Cooper wrote:
> On Tue, Dec 03, 2013 at 10:50:05PM +0100, Andrew Lunn wrote:
> > On Tue, Dec 03, 2013 at 09:39:02PM +0100, Arnaud Ebalard wrote:
> > > Hi Andrew,
> > > 
> > > Andrew Lunn <andrew@lunn.ch> writes:
> > > 
> > > > Replace the numeric key value with a symbolic name from
> > > > <bt-bindings/input/input.h>
> > > >
> > > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > > ---
> > > >  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
> > > >  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
> > > >  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
> > > >  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
> > > >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
> > > >  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
> > > >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
> > > >  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
> > > 
> > > Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
> > > cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
> > > key values with a symbolic name. And it also does the same for GPIO
> > > voltage level. I guess you can remove that specific .dts from your patch.
> > 
> > I sore your patches. I did it slightly different to you, in that i've
> > the includes in the top level kirkwood.dtsi file, where as you put
> > them into the .dts files. That makes yours redundant, if we keep to
> > this scheme.
> > 
> > Jason, which do you prefer, includes in every .dts file, or once in
> > kirkwood.dtsi. 
> 
> I prefer the kernel standard (is it really?) for includes.  Which is
> directly in the file needing it.  So, that would mean in both if we use
> the macros in both.

We don't directly use the macros in kirkwood.dtsi. We use them in
nearly every kirkwood-*.dts* file.

As to kernel standard, looking in arch/arm/boot/*, it seems like
<dt-bindings/gpio/tegra-gpio.h> is mostly used in .dtsi files, not
.dts files, meaning it is included once at a higher level. That is
what my patch does.

     Andrew
Jason Cooper Dec. 4, 2013, 5:21 a.m. UTC | #6
On Tue, Dec 03, 2013 at 11:28:35PM +0100, Andrew Lunn wrote:
> On Tue, Dec 03, 2013 at 04:56:33PM -0500, Jason Cooper wrote:
> > On Tue, Dec 03, 2013 at 10:50:05PM +0100, Andrew Lunn wrote:
> > > On Tue, Dec 03, 2013 at 09:39:02PM +0100, Arnaud Ebalard wrote:
> > > > Hi Andrew,
> > > > 
> > > > Andrew Lunn <andrew@lunn.ch> writes:
> > > > 
> > > > > Replace the numeric key value with a symbolic name from
> > > > > <bt-bindings/input/input.h>
> > > > >
> > > > > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > > > > ---
> > > > >  arch/arm/boot/dts/kirkwood-cloudbox.dts                | 2 +-
> > > > >  arch/arm/boot/dts/kirkwood-dnskw.dtsi                  | 6 +++---
> > > > >  arch/arm/boot/dts/kirkwood-ib62x0.dts                  | 4 ++--
> > > > >  arch/arm/boot/dts/kirkwood-iconnect.dts                | 4 ++--
> > > > >  arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts          | 6 +++---
> > > > >  arch/arm/boot/dts/kirkwood-lsxl.dtsi                   | 6 +++---
> > > > >  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts         | 4 ++--
> > > > >  arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 6 +++---
> > > > 
> > > > Jason just applied (yesterday IIRC) to mvebu/dt a series which provides
> > > > cleanup for ReadyNAS .dts files. Among other things, it replaces numeric
> > > > key values with a symbolic name. And it also does the same for GPIO
> > > > voltage level. I guess you can remove that specific .dts from your patch.
> > > 
> > > I sore your patches. I did it slightly different to you, in that i've
> > > the includes in the top level kirkwood.dtsi file, where as you put
> > > them into the .dts files. That makes yours redundant, if we keep to
> > > this scheme.
> > > 
> > > Jason, which do you prefer, includes in every .dts file, or once in
> > > kirkwood.dtsi. 
> > 
> > I prefer the kernel standard (is it really?) for includes.  Which is
> > directly in the file needing it.  So, that would mean in both if we use
> > the macros in both.
> 
> We don't directly use the macros in kirkwood.dtsi. We use them in
> nearly every kirkwood-*.dts* file.
> 
> As to kernel standard, looking in arch/arm/boot/*, it seems like
> <dt-bindings/gpio/tegra-gpio.h> is mostly used in .dtsi files, not
> .dts files, meaning it is included once at a higher level. 

hmm, yeah, and I forgot about including dtsi's within nodes and other
such stuff.  The analogy from C code (to which I was referring) doesn't
carry that well.

> That is what my patch does.

Yep, keep it in the .dtsi.

thx,

Jason.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
index 142b9cd3b454..17123f25e2db 100644
--- a/arch/arm/boot/dts/kirkwood-cloudbox.dts
+++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
@@ -66,7 +66,7 @@ 
 
 		button@1 {
 			label = "Power push button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio0 16 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index aefa375a550d..1d680d11f629 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -15,17 +15,17 @@ 
 
 		button@1 {
 			label = "Power button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 2 1>;
 		};
 		button@2 {
 			label = "USB unmount button";
-			linux,code = <161>;
+			linux,code = <KEY_EJECTCD>;
 			gpios = <&gpio1 15 1>;
 		};
 		button@3 {
 			label = "Reset button";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio1 16 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index c5fb02f7ebc3..1d69cad81021 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -63,12 +63,12 @@ 
 
 		button@1 {
 			label = "USB Copy";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio0 29 1>;
 		};
 		button@2 {
 			label = "Reset";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio0 28 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 4a62b206f680..d69123f71ebb 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -137,13 +137,13 @@ 
 
 		button@1 {
 			label = "OTB Button";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 3 1>;
 			debounce-interval = <100>;
 		};
 		button@2 {
 			label = "Reset";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio0 12 1>;
 			debounce-interval = <100>;
 		};
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
index d15395d671ed..01534da7b25e 100644
--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
@@ -154,17 +154,17 @@ 
 
 		Power {
 			label = "Power Button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio0 14 1>;
 		};
 		Reset {
 			label = "Reset Button";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio0 12 1>;
 		};
 		OTB {
 			label = "OTB Button";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 3 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-lsxl.dtsi b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
index 4e8f9e42c592..1abfa0dd700b 100644
--- a/arch/arm/boot/dts/kirkwood-lsxl.dtsi
+++ b/arch/arm/boot/dts/kirkwood-lsxl.dtsi
@@ -108,18 +108,18 @@ 
 
 		button@1 {
 			label = "Function Button";
-			linux,code = <357>;
+			linux,code = <KEY_OPTION>;
 			gpios = <&gpio1 9 1>;
 		};
 		button@2 {
 			label = "Power-on Switch";
-			linux,code = <0>;
+			linux,code = <KEY_RESERVED>;
 			linux,input-type = <5>;
 			gpios = <&gpio1 10 1>;
 		};
 		button@3 {
 			label = "Power-auto Switch";
-			linux,code = <1>;
+			linux,code = <KEY_ESC>;
 			linux,input-type = <5>;
 			gpios = <&gpio1 11 1>;
 		};
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
index 6317e1d088b3..ade432466c85 100644
--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -113,12 +113,12 @@ 
 
 		button@1 {
 			label = "SWR Button";
-			linux,code = <0x198>; /* KEY_RESTART */
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio1 15 1>;
 		};
 		button@2 {
 			label = "WPS Button";
-			linux,code = <0x211>; /* KEY_WPS_BUTTON */
+			linux,code = <KEY_WPS_BUTTON>;
 			gpios = <&gpio1 14 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
index e6a102cf424c..c35f917ac438 100644
--- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
+++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
@@ -143,17 +143,17 @@ 
 
 		button@1 {
 			label = "Power Button";
-			linux,code = <116>;     /* KEY_POWER */
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 15 1>;
 		};
 		button@2 {
 			label = "Reset Button";
-			linux,code = <0x198>;   /* KEY_RESTART */
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio0 13 1>;
 		};
 		button@3 {
 			label = "Backup Button";
-			linux,code = <133>;     /* KEY_COPY */
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 13 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index 2fcb82e20828..3101aecdcc0a 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -64,7 +64,7 @@ 
 
 		button@1 {
 			label = "Power push button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 0 0>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index b5418bcaecce..c45a26ce8b57 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -119,17 +119,17 @@ 
 
 		button@1 {
 			label = "Power Button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 14 0>;
 		};
 		button@2 {
 			label = "Copy Button";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 5 1>;
 		};
 		button@3 {
 			label = "Reset Button";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio1 4 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-nsa310a.dts b/arch/arm/boot/dts/kirkwood-nsa310a.dts
index ab0212b0e6f5..874df7d26c7c 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310a.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310a.dts
@@ -107,17 +107,17 @@ 
 
 		button@1 {
 			label = "Power Button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 14 0>;
 		};
 		button@2 {
 			label = "Copy Button";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 5 1>;
 		};
 		button@3 {
 			label = "Reset Button";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio1 4 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
index f0e3d213604c..6c171e067b59 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -124,7 +124,7 @@ 
 
 		button@1 {
 			label = "Init Button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 6 0>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
index 851fb2a60f20..c97bad46c29c 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a7.dts
@@ -149,7 +149,7 @@ 
 
 		button@1 {
 			label = "Init Button";
-			linux,code = <116>;
+			linux,code = <KEY_POWER>;
 			gpios = <&gpio1 6 0>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6281.dts b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
index f755bc1dc604..89f7094117f4 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6281.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6281.dts
@@ -41,12 +41,12 @@ 
 
 		button@1 {
 			label = "USB Copy";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio0 15 1>;
 		};
 		button@2 {
 			label = "Reset";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio0 16 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood-ts219-6282.dts b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
index 345562f75891..6976afb56605 100644
--- a/arch/arm/boot/dts/kirkwood-ts219-6282.dts
+++ b/arch/arm/boot/dts/kirkwood-ts219-6282.dts
@@ -51,12 +51,12 @@ 
 
 		button@1 {
 			label = "USB Copy";
-			linux,code = <133>;
+			linux,code = <KEY_COPY>;
 			gpios = <&gpio1 11 1>;
 		};
 		button@2 {
 			label = "Reset";
-			linux,code = <0x198>;
+			linux,code = <KEY_RESTART>;
 			gpios = <&gpio1 5 1>;
 		};
 	};
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 8b73c80f1dad..477c0b5553e8 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -1,4 +1,5 @@ 
 /include/ "skeleton.dtsi"
+#include <dt-bindings/input/input.h>
 
 #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))