From: dbaryshkov@gmail.com (Dmitry Eremin-Solenikov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/7] pxa25x: drop handling of udc_is_connected
Date: Fri, 1 Apr 2011 17:56:27 +0400 [thread overview]
Message-ID: <1301666188-11822-6-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1301666188-11822-1-git-send-email-dbaryshkov@gmail.com>
There are no more users of udc_is_connected. Drop this field from mach_info
and stop using it in pxa25x_udc.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
arch/arm/include/asm/mach/udc_pxa2xx.h | 1 -
drivers/usb/gadget/pxa25x_udc.c | 13 +++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
index ea297ac..f0719d3 100644
--- a/arch/arm/include/asm/mach/udc_pxa2xx.h
+++ b/arch/arm/include/asm/mach/udc_pxa2xx.h
@@ -10,7 +10,6 @@
*/
struct pxa2xx_udc_mach_info {
- int (*udc_is_connected)(void); /* do we see host? */
void (*udc_command)(int cmd);
#define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */
#define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 6cb32b8..40ceb73 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -1072,7 +1072,7 @@ udc_seq_show(struct seq_file *m, void *_d)
(tmp & UDCCFR_ACM) ? " acm" : "");
}
- if (dev->gadget.speed != USB_SPEED_FULL || !dev->driver)
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN || !dev->driver)
goto done;
seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
@@ -1700,9 +1700,13 @@ pxa25x_udc_irq(int irq, void *_dev)
if (unlikely(udccr & UDCCR_SUSIR)) {
udc_ack_int_UDCCR(UDCCR_SUSIR);
handled = 1;
- DBG(DBG_VERBOSE, "USB suspend\n");
+ DBG(DBG_VERBOSE, "USB suspend%s\n",
+ dev->gadget.speed != USB_SPEED_UNKNOWN
+ ? "" : "+disconnect");
- if (dev->gadget.speed != USB_SPEED_UNKNOWN
+ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
+ stop_activity(dev, dev->driver);
+ else if (dev->gadget.speed != USB_SPEED_UNKNOWN
&& dev->driver
&& dev->driver->suspend)
dev->driver->suspend(&dev->gadget);
@@ -1717,7 +1721,8 @@ pxa25x_udc_irq(int irq, void *_dev)
if (dev->gadget.speed != USB_SPEED_UNKNOWN
&& dev->driver
- && dev->driver->resume)
+ && dev->driver->resume
+ && dev->gadget.speed != USB_SPEED_UNKNOWN)
dev->driver->resume(&dev->gadget);
}
--
1.7.4.1
next prev parent reply other threads:[~2011-04-01 13:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 13:56 [PATCH 1/7] balloon3: drop udc_is_connected Dmitry Eremin-Solenikov
2011-04-01 13:56 ` [PATCH 2/7] mioa701: " Dmitry Eremin-Solenikov
2011-04-01 14:10 ` Sergei Shtylyov
2011-04-01 14:50 ` Dmitry Eremin-Solenikov
2011-04-04 6:58 ` Eric Miao
2011-04-01 13:56 ` [PATCH 3/7] stargate2: udc_is_connected is ignored for pxa27x, drop it Dmitry Eremin-Solenikov
2011-04-01 13:56 ` [PATCH 4/7] pxa25x: separate lubbock handling to lubbock-usb transceiver Dmitry Eremin-Solenikov
2011-04-04 7:01 ` Eric Miao
2011-04-04 7:04 ` Eric Miao
2011-04-06 21:21 ` Dmitry Eremin-Solenikov
2011-04-07 1:48 ` Eric Miao
2011-07-01 11:48 ` Dmitry Eremin-Solenikov
2011-07-05 7:26 ` Eric Miao
2011-07-05 13:26 ` Greg KH
2011-07-05 14:35 ` Dmitry Eremin-Solenikov
2011-04-01 13:56 ` [PATCH 5/7] lubbock: switch to using lubbock_usb_xceiv transceiver Dmitry Eremin-Solenikov
2011-04-01 13:56 ` Dmitry Eremin-Solenikov [this message]
2011-04-01 19:02 ` [PATCH 6/7] pxa25x: drop handling of udc_is_connected Sergei Shtylyov
2011-04-02 14:46 ` Dmitry Eremin-Solenikov
2011-04-01 13:56 ` [PATCH 7/7] gpio-vbus: ask for vbus_draw regulator before registering xceiv Dmitry Eremin-Solenikov
2011-04-18 8:42 ` Eric Miao
2011-05-02 23:38 ` Greg KH
2011-05-03 8:46 ` [PATCH] " Dmitry Eremin-Solenikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301666188-11822-6-git-send-email-dbaryshkov@gmail.com \
--to=dbaryshkov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).