diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-03 22:40:51 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-05 20:32:22 -0400 |
commit | db61ac54c9bea389b98f88cb4a23f8dd1edde07f (patch) | |
tree | 19664ae0593e690bfe010b07199b1fd17c8c6fa9 /arch | |
parent | afc84ad11b5c1247c2d0df06f10df69ea7206f6a (diff) |
ARM: H1940: Change mach-h1940 to use gpiolib API
Change mach-h1940 to use the gpiolib calls instead of s3c2410_gpio
directly.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-s3c2412/mach-smdk2413.c | 8 |
2 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index fbedd0760941..5527f746c5e3 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -207,7 +207,7 @@ static int h1940_backlight_init(struct device *dev) | |||
207 | { | 207 | { |
208 | gpio_request(S3C2410_GPB(0), "Backlight"); | 208 | gpio_request(S3C2410_GPB(0), "Backlight"); |
209 | 209 | ||
210 | s3c2410_gpio_setpin(S3C2410_GPB(0), 0); | 210 | gpio_direction_output(S3C2410_GPB(0), 0); |
211 | s3c2410_gpio_pullup(S3C2410_GPB(0), 0); | 211 | s3c2410_gpio_pullup(S3C2410_GPB(0), 0); |
212 | s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); | 212 | s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); |
213 | 213 | ||
@@ -216,7 +216,7 @@ static int h1940_backlight_init(struct device *dev) | |||
216 | 216 | ||
217 | static void h1940_backlight_exit(struct device *dev) | 217 | static void h1940_backlight_exit(struct device *dev) |
218 | { | 218 | { |
219 | s3c2410_gpio_cfgpin(S3C2410_GPB(0), 1/*S3C2410_GPB0_OUTP*/); | 219 | gpio_direction_output(S3C2410_GPB(0), 1); |
220 | } | 220 | } |
221 | 221 | ||
222 | static struct platform_pwm_backlight_data backlight_data = { | 222 | static struct platform_pwm_backlight_data backlight_data = { |
@@ -245,18 +245,18 @@ static void h1940_lcd_power_set(struct plat_lcd_data *pd, | |||
245 | 245 | ||
246 | if (!power) { | 246 | if (!power) { |
247 | /* set to 3ec */ | 247 | /* set to 3ec */ |
248 | s3c2410_gpio_setpin(S3C2410_GPC(0), 0); | 248 | gpio_direction_output(S3C2410_GPC(0), 0); |
249 | /* wait for 3ac */ | 249 | /* wait for 3ac */ |
250 | do { | 250 | do { |
251 | value = s3c2410_gpio_getpin(S3C2410_GPC(6)); | 251 | value = gpio_get_value(S3C2410_GPC(6)); |
252 | } while (value); | 252 | } while (value); |
253 | /* set to 38c */ | 253 | /* set to 38c */ |
254 | s3c2410_gpio_setpin(S3C2410_GPC(5), 0); | 254 | gpio_direction_output(S3C2410_GPC(5), 0); |
255 | } else { | 255 | } else { |
256 | /* Set to 3ac */ | 256 | /* Set to 3ac */ |
257 | s3c2410_gpio_setpin(S3C2410_GPC(5), 1); | 257 | gpio_direction_output(S3C2410_GPC(5), 1); |
258 | /* Set to 3ad */ | 258 | /* Set to 3ad */ |
259 | s3c2410_gpio_setpin(S3C2410_GPC(0), 1); | 259 | gpio_direction_output(S3C2410_GPC(0), 1); |
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
@@ -332,6 +332,7 @@ static void __init h1940_init(void) | |||
332 | gpio_request(S3C2410_GPC(5), "LCD power"); | 332 | gpio_request(S3C2410_GPC(5), "LCD power"); |
333 | gpio_request(S3C2410_GPC(6), "LCD power"); | 333 | gpio_request(S3C2410_GPC(6), "LCD power"); |
334 | 334 | ||
335 | gpio_direction_input(S3C2410_GPC(6)); | ||
335 | 336 | ||
336 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | 337 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); |
337 | } | 338 | } |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index 0392065af1af..faddb36ed23b 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -85,10 +85,10 @@ static void smdk2413_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
85 | switch (cmd) | 85 | switch (cmd) |
86 | { | 86 | { |
87 | case S3C2410_UDC_P_ENABLE : | 87 | case S3C2410_UDC_P_ENABLE : |
88 | s3c2410_gpio_setpin(S3C2410_GPF(2), 1); | 88 | gpio_set_value(S3C2410_GPF(2), 1); |
89 | break; | 89 | break; |
90 | case S3C2410_UDC_P_DISABLE : | 90 | case S3C2410_UDC_P_DISABLE : |
91 | s3c2410_gpio_setpin(S3C2410_GPF(2), 0); | 91 | gpio_set_value(S3C2410_GPF(2), 0); |
92 | break; | 92 | break; |
93 | case S3C2410_UDC_P_RESET : | 93 | case S3C2410_UDC_P_RESET : |
94 | break; | 94 | break; |
@@ -134,8 +134,8 @@ static void __init smdk2413_machine_init(void) | |||
134 | { /* Turn off suspend on both USB ports, and switch the | 134 | { /* Turn off suspend on both USB ports, and switch the |
135 | * selectable USB port to USB device mode. */ | 135 | * selectable USB port to USB device mode. */ |
136 | 136 | ||
137 | s3c2410_gpio_setpin(S3C2410_GPF(2), 0); | 137 | WARN_ON(gpio_request(S3C2410_GPF(2), "udc pull")); |
138 | s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); | 138 | gpio_direction_output(S3C2410_GPF(2), 0); |
139 | 139 | ||
140 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | | 140 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | |
141 | S3C2410_MISCCR_USBSUSPND0 | | 141 | S3C2410_MISCCR_USBSUSPND0 | |