aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index 4e647b653339..3b70b3897d95 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -64,9 +64,17 @@ static struct platform_device at91sam9261_usbh_device = {
64 64
65void __init at91_add_device_usbh(struct at91_usbh_data *data) 65void __init at91_add_device_usbh(struct at91_usbh_data *data)
66{ 66{
67 int i;
68
67 if (!data) 69 if (!data)
68 return; 70 return;
69 71
72 /* Enable overcurrent notification */
73 for (i = 0; i < data->ports; i++) {
74 if (data->overcurrent_pin[i])
75 at91_set_gpio_input(data->overcurrent_pin[i], 1);
76 }
77
70 usbh_data = *data; 78 usbh_data = *data;
71 platform_device_register(&at91sam9261_usbh_device); 79 platform_device_register(&at91sam9261_usbh_device);
72} 80}