aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/mach-n30.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-n30.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-n30.c')
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 271b9aa6d40a..66f44440d5d3 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -84,26 +84,10 @@ static struct s3c2410_uartcfg n30_uartcfgs[] = {
84 }, 84 },
85}; 85};
86 86
87static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd)
88{
89 switch (cmd) {
90 case S3C2410_UDC_P_ENABLE :
91 gpio_set_value(S3C2410_GPB(3), 1);
92 break;
93 case S3C2410_UDC_P_DISABLE :
94 gpio_set_value(S3C2410_GPB(3), 0);
95 break;
96 case S3C2410_UDC_P_RESET :
97 break;
98 default:
99 break;
100 }
101}
102
103static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { 87static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = {
104 .udc_command = n30_udc_pullup,
105 .vbus_pin = S3C2410_GPG(1), 88 .vbus_pin = S3C2410_GPG(1),
106 .vbus_pin_inverted = 0, 89 .vbus_pin_inverted = 0,
90 .pullup_pin = S3C2410_GPB(3),
107}; 91};
108 92
109static struct gpio_keys_button n30_buttons[] = { 93static struct gpio_keys_button n30_buttons[] = {
@@ -596,9 +580,6 @@ static void __init n30_init(void)
596 580
597 platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); 581 platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices));
598 } 582 }
599
600 WARN_ON(gpio_request(S3C2410_GPB(3), "udc pup"));
601 gpio_direction_output(S3C2410_GPB(3), 0);
602} 583}
603 584
604MACHINE_START(N30, "Acer-N30") 585MACHINE_START(N30, "Acer-N30")