aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/mach-h1940.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-03-07 02:42:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-07 15:23:22 -0500
commite27c3c5c7e0fb107990c7f465a3525312f6d45aa (patch)
tree697835d843f1310cc670511ad078e1ddd305f0ec /arch/arm/mach-s3c2410/mach-h1940.c
parenta74022a55e44fe2044ac3660452cafecb300aece (diff)
ARM: s3c24xx: Switch to common GPIO controlled UDC pullup implementation
Currently all boards using the s3c2410_udc driver use a GPIO to control the state of the pullup, as a result the same code is reimplemented in each board This patch changes these boards to use the common implementation for GPIO controlled pullup in the UDC driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-h1940.c')
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 1a81fe12ccd..1e93f176c1d 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -162,29 +162,10 @@ struct gpio_chip h1940_latch_gpiochip = {
162 .get = h1940_gpiolib_latch_get, 162 .get = h1940_gpiolib_latch_get,
163}; 163};
164 164
165static void h1940_udc_pullup(enum s3c2410_udc_cmd_e cmd)
166{
167 printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);
168
169 switch (cmd)
170 {
171 case S3C2410_UDC_P_ENABLE :
172 gpio_set_value(H1940_LATCH_USB_DP, 1);
173 break;
174 case S3C2410_UDC_P_DISABLE :
175 gpio_set_value(H1940_LATCH_USB_DP, 0);
176 break;
177 case S3C2410_UDC_P_RESET :
178 break;
179 default:
180 break;
181 }
182}
183
184static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = { 165static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = {
185 .udc_command = h1940_udc_pullup,
186 .vbus_pin = S3C2410_GPG(5), 166 .vbus_pin = S3C2410_GPG(5),
187 .vbus_pin_inverted = 1, 167 .vbus_pin_inverted = 1,
168 .pullup_pin = H1940_LATCH_USB_DP,
188}; 169};
189 170
190static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = { 171static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {
@@ -475,9 +456,6 @@ static void __init h1940_init(void)
475 gpio_direction_output(H1940_LATCH_LCD_P4, 0); 456 gpio_direction_output(H1940_LATCH_LCD_P4, 0);
476 gpio_direction_output(H1940_LATCH_MAX1698_nSHUTDOWN, 0); 457 gpio_direction_output(H1940_LATCH_MAX1698_nSHUTDOWN, 0);
477 458
478 gpio_request(H1940_LATCH_USB_DP, "USB pullup");
479 gpio_direction_output(H1940_LATCH_USB_DP, 0);
480
481 gpio_request(H1940_LATCH_SD_POWER, "SD power"); 459 gpio_request(H1940_LATCH_SD_POWER, "SD power");
482 gpio_direction_output(H1940_LATCH_SD_POWER, 0); 460 gpio_direction_output(H1940_LATCH_SD_POWER, 0);
483 461