aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg/twl4030-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/otg/twl4030-usb.c')
-rw-r--r--drivers/usb/otg/twl4030-usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 0e8888588d4..05aaac1c386 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -550,6 +550,7 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev)
550 struct twl4030_usb_data *pdata = pdev->dev.platform_data; 550 struct twl4030_usb_data *pdata = pdev->dev.platform_data;
551 struct twl4030_usb *twl; 551 struct twl4030_usb *twl;
552 int status, err; 552 int status, err;
553 u8 pwr;
553 554
554 if (!pdata) { 555 if (!pdata) {
555 dev_dbg(&pdev->dev, "platform_data not available\n"); 556 dev_dbg(&pdev->dev, "platform_data not available\n");
@@ -568,7 +569,10 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev)
568 twl->otg.set_peripheral = twl4030_set_peripheral; 569 twl->otg.set_peripheral = twl4030_set_peripheral;
569 twl->otg.set_suspend = twl4030_set_suspend; 570 twl->otg.set_suspend = twl4030_set_suspend;
570 twl->usb_mode = pdata->usb_mode; 571 twl->usb_mode = pdata->usb_mode;
571 twl->asleep = 1; 572
573 pwr = twl4030_usb_read(twl, PHY_PWR_CTRL);
574
575 twl->asleep = (pwr & PHY_PWR_PHYPWD);
572 576
573 /* init spinlock for workqueue */ 577 /* init spinlock for workqueue */
574 spin_lock_init(&twl->lock); 578 spin_lock_init(&twl->lock);