aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJamie Lentin <jm@lentin.co.uk>2012-07-19 16:31:00 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-27 10:50:02 -0400
commitbb53d8272609f13028ed7ef07a1597022db5adcd (patch)
tree6cd2696264b4b322ede489c336e980b5be27f5ce /arch
parent5b60c1453d8cf1ac39e897878cfc090181d9a229 (diff)
ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
Move description of GPIO keys on both the DNS320 and DNS325 into DT. Signed-off-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/kirkwood-dnskw.dtsi21
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c37
2 files changed, 21 insertions, 37 deletions
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index 067672cff32..2bad626524d 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -4,6 +4,27 @@
4 model = "D-Link DNS NASes (kirkwood-based)"; 4 model = "D-Link DNS NASes (kirkwood-based)";
5 compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood"; 5 compatible = "dlink,dns-kirkwood", "mrvl,kirkwood-88f6281", "mrvl,kirkwood";
6 6
7 gpio_keys {
8 compatible = "gpio-keys";
9 #address-cells = <1>;
10 #size-cells = <0>;
11 button@1 {
12 label = "Power button";
13 linux,code = <116>;
14 gpios = <&gpio1 2 1>;
15 };
16 button@2 {
17 label = "USB unmount button";
18 linux,code = <161>;
19 gpios = <&gpio1 15 1>;
20 };
21 button@3 {
22 label = "Reset button";
23 linux,code = <0x198>;
24 gpios = <&gpio1 16 1>;
25 };
26 };
27
7 ocp@f1000000 { 28 ocp@f1000000 {
8 sata@80000 { 29 sata@80000 {
9 status = "okay"; 30 status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index aac9c90715c..4ab35065a14 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -19,7 +19,6 @@
19#include <linux/of.h> 19#include <linux/of.h>
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/gpio_keys.h>
23#include <linux/gpio-fan.h> 22#include <linux/gpio-fan.h>
24#include <linux/leds.h> 23#include <linux/leds.h>
25#include <asm/mach-types.h> 24#include <asm/mach-types.h>
@@ -68,41 +67,6 @@ static unsigned int dnskw_mpp_config[] __initdata = {
68 0 67 0
69}; 68};
70 69
71static struct gpio_keys_button dnskw_button_pins[] = {
72 {
73 .code = KEY_POWER,
74 .gpio = 34,
75 .desc = "Power button",
76 .active_low = 1,
77 },
78 {
79 .code = KEY_EJECTCD,
80 .gpio = 47,
81 .desc = "USB unmount button",
82 .active_low = 1,
83 },
84 {
85 .code = KEY_RESTART,
86 .gpio = 48,
87 .desc = "Reset button",
88 .active_low = 1,
89 },
90};
91
92static struct gpio_keys_platform_data dnskw_button_data = {
93 .buttons = dnskw_button_pins,
94 .nbuttons = ARRAY_SIZE(dnskw_button_pins),
95};
96
97static struct platform_device dnskw_button_device = {
98 .name = "gpio-keys",
99 .id = -1,
100 .num_resources = 0,
101 .dev = {
102 .platform_data = &dnskw_button_data,
103 }
104};
105
106/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */ 70/* Fan: ADDA AD045HB-G73 40mm 6000rpm@5v */
107static struct gpio_fan_speed dnskw_fan_speed[] = { 71static struct gpio_fan_speed dnskw_fan_speed[] = {
108 { 0, 0 }, 72 { 0, 0 },
@@ -150,7 +114,6 @@ void __init dnskw_init(void)
150 kirkwood_ehci_init(); 114 kirkwood_ehci_init();
151 kirkwood_ge00_init(&dnskw_ge00_data); 115 kirkwood_ge00_init(&dnskw_ge00_data);
152 116
153 platform_device_register(&dnskw_button_device);
154 platform_device_register(&dnskw_fan_device); 117 platform_device_register(&dnskw_fan_device);
155 118
156 /* Register power-off GPIO. */ 119 /* Register power-off GPIO. */