From b302109f5b0d2832ce45f3337df5b8f47dc1ff2f Mon Sep 17 00:00:00 2001 From: Ravikant Singh Date: Tue, 20 Dec 2011 15:36:03 +0530 Subject: u5500:Ignored link interrupt not to post usb event The ABB link status interrupt is coming twice for LinkStatus = 18 and 13 ,one of them is to be ignored depending on the current ABB hardware version. However for the ignored one too, the ABB driver is sending a spurious USB_EVENT_NONE notification event ,which is thus shutting down the vbus needed for enumerating the device. Hence 5500 usb host is not enumerating any devices. Solution is not to post the event USB_EVENT_NONE for the ignored link status interrupt. ST-Ericsson ID: 401855 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I7a7d8a19a5431e21661a0875061d51ba0129f25e Signed-off-by: Ravikant Singh Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43042 Reviewed-by: Praveena NADAHALLY Reviewed-by: Rabin VINCENT --- drivers/usb/otg/ab5500-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/otg/ab5500-usb.c b/drivers/usb/otg/ab5500-usb.c index 4219c56848e..aa439f6d4e2 100644 --- a/drivers/usb/otg/ab5500-usb.c +++ b/drivers/usb/otg/ab5500-usb.c @@ -202,7 +202,7 @@ static int ab5500_usb_link_status_update(struct ab5500_usb *ab) int ret = 0; int gpioval = 0; enum ab8500_usb_link_status lsts; - enum usb_xceiv_events event = USB_IDLE; + enum usb_xceiv_events event = USB_EVENT_NONE; (void)abx500_get_register_interruptible(ab->dev, AB5500_BANK_USB, AB5500_USB_LINE_STAT_REG, &val); @@ -227,7 +227,7 @@ static int ab5500_usb_link_status_update(struct ab5500_usb *ab) case USB_LINK_HM_IDGND: if (ab->rev >= AB5500_2_0) - break; + return -1; /* enable usb chip Select */ ret = gpio_direction_output(ab->usb_cs_gpio, gpioval); @@ -247,7 +247,7 @@ static int ab5500_usb_link_status_update(struct ab5500_usb *ab) case USB_LINK_HM_IDGND_V2: if (!(ab->rev >= AB5500_2_0)) - break; + return -1; /* enable usb chip Select */ ret = gpio_direction_output(ab->usb_cs_gpio, gpioval); -- cgit v1.2.3