summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvinash Kumar <avinash.kumar@stericsson.com>2011-12-13 16:51:14 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:15 +0200
commit12f0f51f80cc6d0f9e05dbc9e640a8a5f2ad8633 (patch)
tree4d87d9795ac2e57ab1edb80a179a0fd525e9ab06
parentf2ab5db5edc7db17a74ab95a746e24aaa041ea28 (diff)
u5500: USB: Add context save and restore callbacks
adding support for usb registers save restore context support in usb driver. ST-Ericsson ID: 350108 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Id373d0600413adeac5ac8603acc51f721500eafb Signed-off-by: Avinash Kumar <avinash.kumar@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/42338 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
-rw-r--r--drivers/usb/otg/ab5500-usb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/otg/ab5500-usb.c b/drivers/usb/otg/ab5500-usb.c
index d0f59e5b55a..4219c56848e 100644
--- a/drivers/usb/otg/ab5500-usb.c
+++ b/drivers/usb/otg/ab5500-usb.c
@@ -162,6 +162,7 @@ static void ab5500_usb_phy_enable(struct ab5500_usb *ab, bool sel_host)
msecs_to_jiffies(USB_PROBE_DELAY));
}
+ ux500_restore_context();
abx500_mask_and_set_register_interruptible(ab->dev,
AB5500_BANK_USB,
AB5500_USB_PHY_CTRL_REG,
@@ -219,6 +220,9 @@ static int ab5500_usb_link_status_update(struct ab5500_usb *ab)
case USB_LINK_HOST_CHG_NM:
case USB_LINK_HOST_CHG_HS:
case USB_LINK_HOST_CHG_HS_CHIRP:
+
+ ab5500_usb_peri_phy_en(ab);
+
break;
case USB_LINK_HM_IDGND:
@@ -302,8 +306,6 @@ static irqreturn_t ab5500_usb_device_insert_irq(int irq, void *data)
ab->mode = USB_DEVICE;
- ab5500_usb_peri_phy_en(ab);
-
/* enable usb chip Select */
event = USB_EVENT_VBUS;
ret = gpio_direction_output(ab->usb_cs_gpio, val);
@@ -314,8 +316,6 @@ static irqreturn_t ab5500_usb_device_insert_irq(int irq, void *data)
}
gpio_set_value(ab->usb_cs_gpio, 1);
- atomic_notifier_call_chain(&ab->otg.notifier, event, &ab->vbus_draw);
-
return IRQ_HANDLED;
}