diff options
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-n30.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 2b83f8707710..0f6ed61af415 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/gpio_keys.h> | 20 | #include <linux/gpio_keys.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/input.h> | 23 | #include <linux/input.h> |
23 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
24 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
@@ -85,10 +86,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
85 | { | 86 | { |
86 | switch (cmd) { | 87 | switch (cmd) { |
87 | case S3C2410_UDC_P_ENABLE : | 88 | case S3C2410_UDC_P_ENABLE : |
88 | s3c2410_gpio_setpin(S3C2410_GPB3, 1); | 89 | s3c2410_gpio_setpin(S3C2410_GPB(3), 1); |
89 | break; | 90 | break; |
90 | case S3C2410_UDC_P_DISABLE : | 91 | case S3C2410_UDC_P_DISABLE : |
91 | s3c2410_gpio_setpin(S3C2410_GPB3, 0); | 92 | s3c2410_gpio_setpin(S3C2410_GPB(3), 0); |
92 | break; | 93 | break; |
93 | case S3C2410_UDC_P_RESET : | 94 | case S3C2410_UDC_P_RESET : |
94 | break; | 95 | break; |
@@ -99,55 +100,55 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
99 | 100 | ||
100 | static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { | 101 | static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { |
101 | .udc_command = n30_udc_pullup, | 102 | .udc_command = n30_udc_pullup, |
102 | .vbus_pin = S3C2410_GPG1, | 103 | .vbus_pin = S3C2410_GPG(1), |
103 | .vbus_pin_inverted = 0, | 104 | .vbus_pin_inverted = 0, |
104 | }; | 105 | }; |
105 | 106 | ||
106 | static struct gpio_keys_button n30_buttons[] = { | 107 | static struct gpio_keys_button n30_buttons[] = { |
107 | { | 108 | { |
108 | .gpio = S3C2410_GPF0, | 109 | .gpio = S3C2410_GPF(0), |
109 | .code = KEY_POWER, | 110 | .code = KEY_POWER, |
110 | .desc = "Power", | 111 | .desc = "Power", |
111 | .active_low = 0, | 112 | .active_low = 0, |
112 | }, | 113 | }, |
113 | { | 114 | { |
114 | .gpio = S3C2410_GPG9, | 115 | .gpio = S3C2410_GPG(9), |
115 | .code = KEY_UP, | 116 | .code = KEY_UP, |
116 | .desc = "Thumbwheel Up", | 117 | .desc = "Thumbwheel Up", |
117 | .active_low = 0, | 118 | .active_low = 0, |
118 | }, | 119 | }, |
119 | { | 120 | { |
120 | .gpio = S3C2410_GPG8, | 121 | .gpio = S3C2410_GPG(8), |
121 | .code = KEY_DOWN, | 122 | .code = KEY_DOWN, |
122 | .desc = "Thumbwheel Down", | 123 | .desc = "Thumbwheel Down", |
123 | .active_low = 0, | 124 | .active_low = 0, |
124 | }, | 125 | }, |
125 | { | 126 | { |
126 | .gpio = S3C2410_GPG7, | 127 | .gpio = S3C2410_GPG(7), |
127 | .code = KEY_ENTER, | 128 | .code = KEY_ENTER, |
128 | .desc = "Thumbwheel Press", | 129 | .desc = "Thumbwheel Press", |
129 | .active_low = 0, | 130 | .active_low = 0, |
130 | }, | 131 | }, |
131 | { | 132 | { |
132 | .gpio = S3C2410_GPF7, | 133 | .gpio = S3C2410_GPF(7), |
133 | .code = KEY_HOMEPAGE, | 134 | .code = KEY_HOMEPAGE, |
134 | .desc = "Home", | 135 | .desc = "Home", |
135 | .active_low = 0, | 136 | .active_low = 0, |
136 | }, | 137 | }, |
137 | { | 138 | { |
138 | .gpio = S3C2410_GPF6, | 139 | .gpio = S3C2410_GPF(6), |
139 | .code = KEY_CALENDAR, | 140 | .code = KEY_CALENDAR, |
140 | .desc = "Calendar", | 141 | .desc = "Calendar", |
141 | .active_low = 0, | 142 | .active_low = 0, |
142 | }, | 143 | }, |
143 | { | 144 | { |
144 | .gpio = S3C2410_GPF5, | 145 | .gpio = S3C2410_GPF(5), |
145 | .code = KEY_ADDRESSBOOK, | 146 | .code = KEY_ADDRESSBOOK, |
146 | .desc = "Contacts", | 147 | .desc = "Contacts", |
147 | .active_low = 0, | 148 | .active_low = 0, |
148 | }, | 149 | }, |
149 | { | 150 | { |
150 | .gpio = S3C2410_GPF4, | 151 | .gpio = S3C2410_GPF(4), |
151 | .code = KEY_MAIL, | 152 | .code = KEY_MAIL, |
152 | .desc = "Mail", | 153 | .desc = "Mail", |
153 | .active_low = 0, | 154 | .active_low = 0, |
@@ -169,73 +170,73 @@ static struct platform_device n30_button_device = { | |||
169 | 170 | ||
170 | static struct gpio_keys_button n35_buttons[] = { | 171 | static struct gpio_keys_button n35_buttons[] = { |
171 | { | 172 | { |
172 | .gpio = S3C2410_GPF0, | 173 | .gpio = S3C2410_GPF(0), |
173 | .code = KEY_POWER, | 174 | .code = KEY_POWER, |
174 | .desc = "Power", | 175 | .desc = "Power", |
175 | .active_low = 0, | 176 | .active_low = 0, |
176 | }, | 177 | }, |
177 | { | 178 | { |
178 | .gpio = S3C2410_GPG9, | 179 | .gpio = S3C2410_GPG(9), |
179 | .code = KEY_UP, | 180 | .code = KEY_UP, |
180 | .desc = "Joystick Up", | 181 | .desc = "Joystick Up", |
181 | .active_low = 0, | 182 | .active_low = 0, |
182 | }, | 183 | }, |
183 | { | 184 | { |
184 | .gpio = S3C2410_GPG8, | 185 | .gpio = S3C2410_GPG(8), |
185 | .code = KEY_DOWN, | 186 | .code = KEY_DOWN, |
186 | .desc = "Joystick Down", | 187 | .desc = "Joystick Down", |
187 | .active_low = 0, | 188 | .active_low = 0, |
188 | }, | 189 | }, |
189 | { | 190 | { |
190 | .gpio = S3C2410_GPG6, | 191 | .gpio = S3C2410_GPG(6), |
191 | .code = KEY_DOWN, | 192 | .code = KEY_DOWN, |
192 | .desc = "Joystick Left", | 193 | .desc = "Joystick Left", |
193 | .active_low = 0, | 194 | .active_low = 0, |
194 | }, | 195 | }, |
195 | { | 196 | { |
196 | .gpio = S3C2410_GPG5, | 197 | .gpio = S3C2410_GPG(5), |
197 | .code = KEY_DOWN, | 198 | .code = KEY_DOWN, |
198 | .desc = "Joystick Right", | 199 | .desc = "Joystick Right", |
199 | .active_low = 0, | 200 | .active_low = 0, |
200 | }, | 201 | }, |
201 | { | 202 | { |
202 | .gpio = S3C2410_GPG7, | 203 | .gpio = S3C2410_GPG(7), |
203 | .code = KEY_ENTER, | 204 | .code = KEY_ENTER, |
204 | .desc = "Joystick Press", | 205 | .desc = "Joystick Press", |
205 | .active_low = 0, | 206 | .active_low = 0, |
206 | }, | 207 | }, |
207 | { | 208 | { |
208 | .gpio = S3C2410_GPF7, | 209 | .gpio = S3C2410_GPF(7), |
209 | .code = KEY_HOMEPAGE, | 210 | .code = KEY_HOMEPAGE, |
210 | .desc = "Home", | 211 | .desc = "Home", |
211 | .active_low = 0, | 212 | .active_low = 0, |
212 | }, | 213 | }, |
213 | { | 214 | { |
214 | .gpio = S3C2410_GPF6, | 215 | .gpio = S3C2410_GPF(6), |
215 | .code = KEY_CALENDAR, | 216 | .code = KEY_CALENDAR, |
216 | .desc = "Calendar", | 217 | .desc = "Calendar", |
217 | .active_low = 0, | 218 | .active_low = 0, |
218 | }, | 219 | }, |
219 | { | 220 | { |
220 | .gpio = S3C2410_GPF5, | 221 | .gpio = S3C2410_GPF(5), |
221 | .code = KEY_ADDRESSBOOK, | 222 | .code = KEY_ADDRESSBOOK, |
222 | .desc = "Contacts", | 223 | .desc = "Contacts", |
223 | .active_low = 0, | 224 | .active_low = 0, |
224 | }, | 225 | }, |
225 | { | 226 | { |
226 | .gpio = S3C2410_GPF4, | 227 | .gpio = S3C2410_GPF(4), |
227 | .code = KEY_MAIL, | 228 | .code = KEY_MAIL, |
228 | .desc = "Mail", | 229 | .desc = "Mail", |
229 | .active_low = 0, | 230 | .active_low = 0, |
230 | }, | 231 | }, |
231 | { | 232 | { |
232 | .gpio = S3C2410_GPF3, | 233 | .gpio = S3C2410_GPF(3), |
233 | .code = SW_RADIO, | 234 | .code = SW_RADIO, |
234 | .desc = "GPS Antenna", | 235 | .desc = "GPS Antenna", |
235 | .active_low = 0, | 236 | .active_low = 0, |
236 | }, | 237 | }, |
237 | { | 238 | { |
238 | .gpio = S3C2410_GPG2, | 239 | .gpio = S3C2410_GPG(2), |
239 | .code = SW_HEADPHONE_INSERT, | 240 | .code = SW_HEADPHONE_INSERT, |
240 | .desc = "Headphone", | 241 | .desc = "Headphone", |
241 | .active_low = 0, | 242 | .active_low = 0, |
@@ -259,7 +260,7 @@ static struct platform_device n35_button_device = { | |||
259 | /* This is the bluetooth LED on the device. */ | 260 | /* This is the bluetooth LED on the device. */ |
260 | static struct s3c24xx_led_platdata n30_blue_led_pdata = { | 261 | static struct s3c24xx_led_platdata n30_blue_led_pdata = { |
261 | .name = "blue_led", | 262 | .name = "blue_led", |
262 | .gpio = S3C2410_GPG6, | 263 | .gpio = S3C2410_GPG(6), |
263 | .def_trigger = "", | 264 | .def_trigger = "", |
264 | }; | 265 | }; |
265 | 266 | ||
@@ -270,7 +271,7 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { | |||
270 | static struct s3c24xx_led_platdata n30_warning_led_pdata = { | 271 | static struct s3c24xx_led_platdata n30_warning_led_pdata = { |
271 | .name = "warning_led", | 272 | .name = "warning_led", |
272 | .flags = S3C24XX_LEDF_ACTLOW, | 273 | .flags = S3C24XX_LEDF_ACTLOW, |
273 | .gpio = S3C2410_GPD9, | 274 | .gpio = S3C2410_GPD(9), |
274 | .def_trigger = "", | 275 | .def_trigger = "", |
275 | }; | 276 | }; |
276 | 277 | ||