diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-05-17 17:32:23 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-18 11:26:03 -0400 |
commit | 070276d5d049f385763dee19112bea08f56c9a0d (patch) | |
tree | 5a32a885de72f18476ff067a25d8a159ac01629d /arch/arm/mach-s3c2410/mach-n30.c | |
parent | 75cbcff3729fe2568dff38d16d6494f8fb7f59fe (diff) |
[ARM] S3C24XX: GPIO: Change to macros for GPIO numbering
Prepare to remove the large number of S3C2410_GPxn defines
by moving to S3C2410_GPx(n) in arch/arm.
The following perl was used to change the files:
perl -pi~ -e 's/S3C2410_GP([A-Z])([0-9]+)([^_^0-9])/S3C2410_GP\1\(\2\)\3/g'
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-n30.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 83705036ca6..0f6ed61af41 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -86,10 +86,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
86 | { | 86 | { |
87 | switch (cmd) { | 87 | switch (cmd) { |
88 | case S3C2410_UDC_P_ENABLE : | 88 | case S3C2410_UDC_P_ENABLE : |
89 | s3c2410_gpio_setpin(S3C2410_GPB3, 1); | 89 | s3c2410_gpio_setpin(S3C2410_GPB(3), 1); |
90 | break; | 90 | break; |
91 | case S3C2410_UDC_P_DISABLE : | 91 | case S3C2410_UDC_P_DISABLE : |
92 | s3c2410_gpio_setpin(S3C2410_GPB3, 0); | 92 | s3c2410_gpio_setpin(S3C2410_GPB(3), 0); |
93 | break; | 93 | break; |
94 | case S3C2410_UDC_P_RESET : | 94 | case S3C2410_UDC_P_RESET : |
95 | break; | 95 | break; |
@@ -100,55 +100,55 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
100 | 100 | ||
101 | static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { | 101 | static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { |
102 | .udc_command = n30_udc_pullup, | 102 | .udc_command = n30_udc_pullup, |
103 | .vbus_pin = S3C2410_GPG1, | 103 | .vbus_pin = S3C2410_GPG(1), |
104 | .vbus_pin_inverted = 0, | 104 | .vbus_pin_inverted = 0, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static struct gpio_keys_button n30_buttons[] = { | 107 | static struct gpio_keys_button n30_buttons[] = { |
108 | { | 108 | { |
109 | .gpio = S3C2410_GPF0, | 109 | .gpio = S3C2410_GPF(0), |
110 | .code = KEY_POWER, | 110 | .code = KEY_POWER, |
111 | .desc = "Power", | 111 | .desc = "Power", |
112 | .active_low = 0, | 112 | .active_low = 0, |
113 | }, | 113 | }, |
114 | { | 114 | { |
115 | .gpio = S3C2410_GPG9, | 115 | .gpio = S3C2410_GPG(9), |
116 | .code = KEY_UP, | 116 | .code = KEY_UP, |
117 | .desc = "Thumbwheel Up", | 117 | .desc = "Thumbwheel Up", |
118 | .active_low = 0, | 118 | .active_low = 0, |
119 | }, | 119 | }, |
120 | { | 120 | { |
121 | .gpio = S3C2410_GPG8, | 121 | .gpio = S3C2410_GPG(8), |
122 | .code = KEY_DOWN, | 122 | .code = KEY_DOWN, |
123 | .desc = "Thumbwheel Down", | 123 | .desc = "Thumbwheel Down", |
124 | .active_low = 0, | 124 | .active_low = 0, |
125 | }, | 125 | }, |
126 | { | 126 | { |
127 | .gpio = S3C2410_GPG7, | 127 | .gpio = S3C2410_GPG(7), |
128 | .code = KEY_ENTER, | 128 | .code = KEY_ENTER, |
129 | .desc = "Thumbwheel Press", | 129 | .desc = "Thumbwheel Press", |
130 | .active_low = 0, | 130 | .active_low = 0, |
131 | }, | 131 | }, |
132 | { | 132 | { |
133 | .gpio = S3C2410_GPF7, | 133 | .gpio = S3C2410_GPF(7), |
134 | .code = KEY_HOMEPAGE, | 134 | .code = KEY_HOMEPAGE, |
135 | .desc = "Home", | 135 | .desc = "Home", |
136 | .active_low = 0, | 136 | .active_low = 0, |
137 | }, | 137 | }, |
138 | { | 138 | { |
139 | .gpio = S3C2410_GPF6, | 139 | .gpio = S3C2410_GPF(6), |
140 | .code = KEY_CALENDAR, | 140 | .code = KEY_CALENDAR, |
141 | .desc = "Calendar", | 141 | .desc = "Calendar", |
142 | .active_low = 0, | 142 | .active_low = 0, |
143 | }, | 143 | }, |
144 | { | 144 | { |
145 | .gpio = S3C2410_GPF5, | 145 | .gpio = S3C2410_GPF(5), |
146 | .code = KEY_ADDRESSBOOK, | 146 | .code = KEY_ADDRESSBOOK, |
147 | .desc = "Contacts", | 147 | .desc = "Contacts", |
148 | .active_low = 0, | 148 | .active_low = 0, |
149 | }, | 149 | }, |
150 | { | 150 | { |
151 | .gpio = S3C2410_GPF4, | 151 | .gpio = S3C2410_GPF(4), |
152 | .code = KEY_MAIL, | 152 | .code = KEY_MAIL, |
153 | .desc = "Mail", | 153 | .desc = "Mail", |
154 | .active_low = 0, | 154 | .active_low = 0, |
@@ -170,73 +170,73 @@ static struct platform_device n30_button_device = { | |||
170 | 170 | ||
171 | static struct gpio_keys_button n35_buttons[] = { | 171 | static struct gpio_keys_button n35_buttons[] = { |
172 | { | 172 | { |
173 | .gpio = S3C2410_GPF0, | 173 | .gpio = S3C2410_GPF(0), |
174 | .code = KEY_POWER, | 174 | .code = KEY_POWER, |
175 | .desc = "Power", | 175 | .desc = "Power", |
176 | .active_low = 0, | 176 | .active_low = 0, |
177 | }, | 177 | }, |
178 | { | 178 | { |
179 | .gpio = S3C2410_GPG9, | 179 | .gpio = S3C2410_GPG(9), |
180 | .code = KEY_UP, | 180 | .code = KEY_UP, |
181 | .desc = "Joystick Up", | 181 | .desc = "Joystick Up", |
182 | .active_low = 0, | 182 | .active_low = 0, |
183 | }, | 183 | }, |
184 | { | 184 | { |
185 | .gpio = S3C2410_GPG8, | 185 | .gpio = S3C2410_GPG(8), |
186 | .code = KEY_DOWN, | 186 | .code = KEY_DOWN, |
187 | .desc = "Joystick Down", | 187 | .desc = "Joystick Down", |
188 | .active_low = 0, | 188 | .active_low = 0, |
189 | }, | 189 | }, |
190 | { | 190 | { |
191 | .gpio = S3C2410_GPG6, | 191 | .gpio = S3C2410_GPG(6), |
192 | .code = KEY_DOWN, | 192 | .code = KEY_DOWN, |
193 | .desc = "Joystick Left", | 193 | .desc = "Joystick Left", |
194 | .active_low = 0, | 194 | .active_low = 0, |
195 | }, | 195 | }, |
196 | { | 196 | { |
197 | .gpio = S3C2410_GPG5, | 197 | .gpio = S3C2410_GPG(5), |
198 | .code = KEY_DOWN, | 198 | .code = KEY_DOWN, |
199 | .desc = "Joystick Right", | 199 | .desc = "Joystick Right", |
200 | .active_low = 0, | 200 | .active_low = 0, |
201 | }, | 201 | }, |
202 | { | 202 | { |
203 | .gpio = S3C2410_GPG7, | 203 | .gpio = S3C2410_GPG(7), |
204 | .code = KEY_ENTER, | 204 | .code = KEY_ENTER, |
205 | .desc = "Joystick Press", | 205 | .desc = "Joystick Press", |
206 | .active_low = 0, | 206 | .active_low = 0, |
207 | }, | 207 | }, |
208 | { | 208 | { |
209 | .gpio = S3C2410_GPF7, | 209 | .gpio = S3C2410_GPF(7), |
210 | .code = KEY_HOMEPAGE, | 210 | .code = KEY_HOMEPAGE, |
211 | .desc = "Home", | 211 | .desc = "Home", |
212 | .active_low = 0, | 212 | .active_low = 0, |
213 | }, | 213 | }, |
214 | { | 214 | { |
215 | .gpio = S3C2410_GPF6, | 215 | .gpio = S3C2410_GPF(6), |
216 | .code = KEY_CALENDAR, | 216 | .code = KEY_CALENDAR, |
217 | .desc = "Calendar", | 217 | .desc = "Calendar", |
218 | .active_low = 0, | 218 | .active_low = 0, |
219 | }, | 219 | }, |
220 | { | 220 | { |
221 | .gpio = S3C2410_GPF5, | 221 | .gpio = S3C2410_GPF(5), |
222 | .code = KEY_ADDRESSBOOK, | 222 | .code = KEY_ADDRESSBOOK, |
223 | .desc = "Contacts", | 223 | .desc = "Contacts", |
224 | .active_low = 0, | 224 | .active_low = 0, |
225 | }, | 225 | }, |
226 | { | 226 | { |
227 | .gpio = S3C2410_GPF4, | 227 | .gpio = S3C2410_GPF(4), |
228 | .code = KEY_MAIL, | 228 | .code = KEY_MAIL, |
229 | .desc = "Mail", | 229 | .desc = "Mail", |
230 | .active_low = 0, | 230 | .active_low = 0, |
231 | }, | 231 | }, |
232 | { | 232 | { |
233 | .gpio = S3C2410_GPF3, | 233 | .gpio = S3C2410_GPF(3), |
234 | .code = SW_RADIO, | 234 | .code = SW_RADIO, |
235 | .desc = "GPS Antenna", | 235 | .desc = "GPS Antenna", |
236 | .active_low = 0, | 236 | .active_low = 0, |
237 | }, | 237 | }, |
238 | { | 238 | { |
239 | .gpio = S3C2410_GPG2, | 239 | .gpio = S3C2410_GPG(2), |
240 | .code = SW_HEADPHONE_INSERT, | 240 | .code = SW_HEADPHONE_INSERT, |
241 | .desc = "Headphone", | 241 | .desc = "Headphone", |
242 | .active_low = 0, | 242 | .active_low = 0, |
@@ -260,7 +260,7 @@ static struct platform_device n35_button_device = { | |||
260 | /* This is the bluetooth LED on the device. */ | 260 | /* This is the bluetooth LED on the device. */ |
261 | static struct s3c24xx_led_platdata n30_blue_led_pdata = { | 261 | static struct s3c24xx_led_platdata n30_blue_led_pdata = { |
262 | .name = "blue_led", | 262 | .name = "blue_led", |
263 | .gpio = S3C2410_GPG6, | 263 | .gpio = S3C2410_GPG(6), |
264 | .def_trigger = "", | 264 | .def_trigger = "", |
265 | }; | 265 | }; |
266 | 266 | ||
@@ -271,7 +271,7 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { | |||
271 | static struct s3c24xx_led_platdata n30_warning_led_pdata = { | 271 | static struct s3c24xx_led_platdata n30_warning_led_pdata = { |
272 | .name = "warning_led", | 272 | .name = "warning_led", |
273 | .flags = S3C24XX_LEDF_ACTLOW, | 273 | .flags = S3C24XX_LEDF_ACTLOW, |
274 | .gpio = S3C2410_GPD9, | 274 | .gpio = S3C2410_GPD(9), |
275 | .def_trigger = "", | 275 | .def_trigger = "", |
276 | }; | 276 | }; |
277 | 277 | ||