Merge branch 'depends/rmk/gpio' into next/devel
[pandora-kernel.git] / arch / arm / mach-at91 / at91rm9200_devices.c
index 978be95..01d8bbd 100644 (file)
@@ -60,9 +60,17 @@ static struct platform_device at91rm9200_usbh_device = {
 
 void __init at91_add_device_usbh(struct at91_usbh_data *data)
 {
+       int i;
+
        if (!data)
                return;
 
+       /* Enable overcurrent notification */
+       for (i = 0; i < data->ports; i++) {
+               if (data->overcurrent_pin[i])
+                       at91_set_gpio_input(data->overcurrent_pin[i], 1);
+       }
+
        usbh_data = *data;
        platform_device_register(&at91rm9200_usbh_device);
 }