aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c22
-rw-r--r--drivers/usb/gadget/omap_udc.c9
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c17
3 files changed, 14 insertions, 34 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 583db7c38cf1..f2bdf4e1eb80 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -935,14 +935,10 @@ static int dummy_udc_remove (struct device *dev)
935 return 0; 935 return 0;
936} 936}
937 937
938static int dummy_udc_suspend (struct device *dev, pm_message_t state, 938static int dummy_udc_suspend (struct device *dev, pm_message_t state)
939 u32 level)
940{ 939{
941 struct dummy *dum = dev_get_drvdata(dev); 940 struct dummy *dum = dev_get_drvdata(dev);
942 941
943 if (level != SUSPEND_DISABLE)
944 return 0;
945
946 dev_dbg (dev, "%s\n", __FUNCTION__); 942 dev_dbg (dev, "%s\n", __FUNCTION__);
947 spin_lock_irq (&dum->lock); 943 spin_lock_irq (&dum->lock);
948 dum->udc_suspended = 1; 944 dum->udc_suspended = 1;
@@ -954,13 +950,10 @@ static int dummy_udc_suspend (struct device *dev, pm_message_t state,
954 return 0; 950 return 0;
955} 951}
956 952
957static int dummy_udc_resume (struct device *dev, u32 level) 953static int dummy_udc_resume (struct device *dev)
958{ 954{
959 struct dummy *dum = dev_get_drvdata(dev); 955 struct dummy *dum = dev_get_drvdata(dev);
960 956
961 if (level != RESUME_ENABLE)
962 return 0;
963
964 dev_dbg (dev, "%s\n", __FUNCTION__); 957 dev_dbg (dev, "%s\n", __FUNCTION__);
965 spin_lock_irq (&dum->lock); 958 spin_lock_irq (&dum->lock);
966 dum->udc_suspended = 0; 959 dum->udc_suspended = 0;
@@ -1936,14 +1929,10 @@ static int dummy_hcd_remove (struct device *dev)
1936 return 0; 1929 return 0;
1937} 1930}
1938 1931
1939static int dummy_hcd_suspend (struct device *dev, pm_message_t state, 1932static int dummy_hcd_suspend (struct device *dev, pm_message_t state)
1940 u32 level)
1941{ 1933{
1942 struct usb_hcd *hcd; 1934 struct usb_hcd *hcd;
1943 1935
1944 if (level != SUSPEND_DISABLE)
1945 return 0;
1946
1947 dev_dbg (dev, "%s\n", __FUNCTION__); 1936 dev_dbg (dev, "%s\n", __FUNCTION__);
1948 hcd = dev_get_drvdata (dev); 1937 hcd = dev_get_drvdata (dev);
1949 1938
@@ -1958,13 +1947,10 @@ static int dummy_hcd_suspend (struct device *dev, pm_message_t state,
1958 return 0; 1947 return 0;
1959} 1948}
1960 1949
1961static int dummy_hcd_resume (struct device *dev, u32 level) 1950static int dummy_hcd_resume (struct device *dev)
1962{ 1951{
1963 struct usb_hcd *hcd; 1952 struct usb_hcd *hcd;
1964 1953
1965 if (level != RESUME_ENABLE)
1966 return 0;
1967
1968 dev_dbg (dev, "%s\n", __FUNCTION__); 1954 dev_dbg (dev, "%s\n", __FUNCTION__);
1969 hcd = dev_get_drvdata (dev); 1955 hcd = dev_get_drvdata (dev);
1970 hcd->state = HC_STATE_RUNNING; 1956 hcd->state = HC_STATE_RUNNING;
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index ff5533e69560..58b3ec97fb9a 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -2909,12 +2909,10 @@ static int __exit omap_udc_remove(struct device *dev)
2909 * may involve talking to an external transceiver (e.g. isp1301). 2909 * may involve talking to an external transceiver (e.g. isp1301).
2910 */ 2910 */
2911 2911
2912static int omap_udc_suspend(struct device *dev, pm_message_t message, u32 level) 2912static int omap_udc_suspend(struct device *dev, pm_message_t message)
2913{ 2913{
2914 u32 devstat; 2914 u32 devstat;
2915 2915
2916 if (level != SUSPEND_POWER_DOWN)
2917 return 0;
2918 devstat = UDC_DEVSTAT_REG; 2916 devstat = UDC_DEVSTAT_REG;
2919 2917
2920 /* we're requesting 48 MHz clock if the pullup is enabled 2918 /* we're requesting 48 MHz clock if the pullup is enabled
@@ -2931,11 +2929,8 @@ static int omap_udc_suspend(struct device *dev, pm_message_t message, u32 level)
2931 return 0; 2929 return 0;
2932} 2930}
2933 2931
2934static int omap_udc_resume(struct device *dev, u32 level) 2932static int omap_udc_resume(struct device *dev)
2935{ 2933{
2936 if (level != RESUME_POWER_ON)
2937 return 0;
2938
2939 DBG("resume + wakeup/SRP\n"); 2934 DBG("resume + wakeup/SRP\n");
2940 omap_pullup(&udc->gadget, 1); 2935 omap_pullup(&udc->gadget, 1);
2941 2936
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index 73f8c9404156..00dfe42d7a86 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -2602,24 +2602,23 @@ static int __exit pxa2xx_udc_remove(struct device *_dev)
2602 * VBUS IRQs should probably be ignored so that the PXA device just acts 2602 * VBUS IRQs should probably be ignored so that the PXA device just acts
2603 * "dead" to USB hosts until system resume. 2603 * "dead" to USB hosts until system resume.
2604 */ 2604 */
2605static int pxa2xx_udc_suspend(struct device *dev, pm_message_t state, u32 level) 2605static int pxa2xx_udc_suspend(struct device *dev, pm_message_t state)
2606{ 2606{
2607 struct pxa2xx_udc *udc = dev_get_drvdata(dev); 2607 struct pxa2xx_udc *udc = dev_get_drvdata(dev);
2608 2608
2609 if (level == SUSPEND_POWER_DOWN) { 2609 if (!udc->mach->udc_command)
2610 if (!udc->mach->udc_command) 2610 WARN("USB host won't detect disconnect!\n");
2611 WARN("USB host won't detect disconnect!\n"); 2611 pullup(udc, 0);
2612 pullup(udc, 0); 2612
2613 }
2614 return 0; 2613 return 0;
2615} 2614}
2616 2615
2617static int pxa2xx_udc_resume(struct device *dev, u32 level) 2616static int pxa2xx_udc_resume(struct device *dev)
2618{ 2617{
2619 struct pxa2xx_udc *udc = dev_get_drvdata(dev); 2618 struct pxa2xx_udc *udc = dev_get_drvdata(dev);
2620 2619
2621 if (level == RESUME_POWER_ON) 2620 pullup(udc, 1);
2622 pullup(udc, 1); 2621
2623 return 0; 2622 return 0;
2624} 2623}
2625 2624