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/arm/mach-s3c2410/mach-h1940.c | |
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/arm/mach-s3c2410/mach-h1940.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 15 |
1 files changed, 8 insertions, 7 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 | } |