summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-omap-2.6.29/omap3-touchbook/usb-lower-current-consumption-upon-insertion.patch
blob: e2df6cf83dc9acf23434be8bb08cfc17e7fc88bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- a/drivers/usb/core/hub.c	2009-07-28 08:47:00.000000000 -0700
+++ b/drivers/usb/core/hub.c	2009-07-28 08:32:20.000000000 -0700
@@ -22,6 +22,7 @@
 #include <linux/kthread.h>
 #include <linux/mutex.h>
 #include <linux/freezer.h>
+#include <linux/gpio.h>
 
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
@@ -3129,9 +3130,18 @@
 					USB_PORT_FEAT_C_RESET);
 			}
 
-			if (connect_change)
+			if (connect_change) {
+				if(portstatus & USB_PORT_STAT_CONNECTION) {
+					gpio_set_value(176,0);
+					mdelay(25);
+				}
 				hub_port_connect_change(hub, i,
 						portstatus, portchange);
+				if(portstatus & USB_PORT_STAT_CONNECTION) {
+					mdelay(75);
+					gpio_set_value(176,1);
+				}
+			}
 		} /* end for i */
 
 		/* deal with hub status changes */