All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] Big pxa2[57]x_udc cleanup
@ 2011-07-05 13:08 Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 01/15] ARM: pxa/balloon3: drop udc_is_connected Dmitry Eremin-Solenikov
                   ` (15 more replies)
  0 siblings, 16 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hello colleagues,

Please review the following patch serie. It's major task is removal of code
and functionality duplication between pxa2[57]x_udc drivers and OTG
transceivers subsystem.

The following changes since commit fe0d42203cb5616eeff68b14576a0f7e2dd56625:

  Linux 3.0-rc6 (2011-07-04 15:56:24 -0700)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/lumag/tosa-2.6.git misc/pxa-udc-cleanup

Dmitry Eremin-Solenikov (15):
      ARM: pxa/balloon3: drop udc_is_connected
      ARM: pxa/mioa701: drop udc_is_connected
      ARM: pxa/stargate2: drop udc_is_connected
      ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver
      ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver
      pxa: drop handling of udc_is_connected
      pxa25x_udc: drop support for udc_command
      otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing
      corgi: convert to use gpio-pullup
      poodle: convert to use gpio-pullup
      h5000: convert to use gpio-pullup
      gpio-vbus: support disabling D+ pullup on suspend
      mioa701: move gpio-pullup functionality to gpio-vbus
      gpio-pullup: support disabling D+ pullup on suspend
      pxa2[57]x_udc: drop gpio_pullup handling

 arch/arm/include/asm/mach/udc_pxa2xx.h |    9 --
 arch/arm/mach-pxa/balloon3.c           |    7 -
 arch/arm/mach-pxa/colibri-pxa320.c     |    1 -
 arch/arm/mach-pxa/corgi.c              |   14 ++-
 arch/arm/mach-pxa/devices.c            |    2 +-
 arch/arm/mach-pxa/h5000.c              |   14 ++-
 arch/arm/mach-pxa/lubbock.c            |   17 +--
 arch/arm/mach-pxa/mioa701.c            |   19 +--
 arch/arm/mach-pxa/poodle.c             |   13 ++-
 arch/arm/mach-pxa/stargate2.c          |    6 -
 arch/arm/mach-pxa/vpac270.c            |    1 -
 drivers/usb/gadget/pxa25x_udc.c        |  132 ---------------------
 drivers/usb/gadget/pxa27x_udc.c        |   27 +----
 drivers/usb/otg/Kconfig                |   18 +++
 drivers/usb/otg/Makefile               |    2 +
 drivers/usb/otg/gpio_pullup.c          |  204 ++++++++++++++++++++++++++++++++
 drivers/usb/otg/gpio_vbus.c            |   42 +++++++
 drivers/usb/otg/lubbock-usb.c          |  178 ++++++++++++++++++++++++++++
 include/linux/usb/gpio_vbus.h          |    1 +
 19 files changed, 493 insertions(+), 214 deletions(-)
 create mode 100644 drivers/usb/otg/gpio_pullup.c
 create mode 100644 drivers/usb/otg/lubbock-usb.c

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 01/15] ARM: pxa/balloon3: drop udc_is_connected
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 02/15] ARM: pxa/mioa701: " Dmitry Eremin-Solenikov
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Balloon3 is a pxa270 machins and pxa27x_udc driver doesn't pay any attention
to udc_is_connected, so drop it.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
---
 arch/arm/mach-pxa/balloon3.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index 810a982..4d0d8c3 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -316,14 +316,8 @@ static void balloon3_udc_command(int cmd)
 		UP2OCR &= ~UP2OCR_DPPUE;
 }
 
-static int balloon3_udc_is_connected(void)
-{
-	return 1;
-}
-
 static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = {
 	.udc_command		= balloon3_udc_command,
-	.udc_is_connected	= balloon3_udc_is_connected,
 	.gpio_pullup		= -1,
 };
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 02/15] ARM: pxa/mioa701: drop udc_is_connected
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 01/15] ARM: pxa/balloon3: drop udc_is_connected Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 03/15] ARM: pxa/stargate2: " Dmitry Eremin-Solenikov
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Mioa701 is a pxa270 machine and pxa27x_udc driver doesn't pay any attention
to udc_is_connected, so drop it.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
---
 arch/arm/mach-pxa/mioa701.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index e347013..d833a26 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -402,13 +402,7 @@ static void gsm_exit(void)
 /*
  * USB UDC
  */
-static int is_usb_connected(void)
-{
-	return !gpio_get_value(GPIO13_nUSB_DETECT);
-}
-
 static struct pxa2xx_udc_mach_info mioa701_udc_info = {
-	.udc_is_connected = is_usb_connected,
 	.gpio_pullup	  = GPIO22_USB_ENABLE,
 };
 
@@ -569,6 +563,11 @@ static int is_ac_connected(void)
 	return gpio_get_value(GPIO96_AC_DETECT);
 }
 
+static int is_usb_connected(void)
+{
+	return !gpio_get_value(GPIO13_nUSB_DETECT);
+}
+
 static void mioa701_set_charge(int flags)
 {
 	gpio_set_value(GPIO9_CHARGE_EN, (flags == PDA_POWER_CHARGE_USB));
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 03/15] ARM: pxa/stargate2: drop udc_is_connected
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 01/15] ARM: pxa/balloon3: drop udc_is_connected Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 02/15] ARM: pxa/mioa701: " Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver Dmitry Eremin-Solenikov
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
---
 arch/arm/mach-pxa/stargate2.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index cb5611d..3e3621d 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -956,13 +956,7 @@ static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
 /* Board doesn't support cable detection - so always lie and say
  * something is there.
  */
-static int sg2_udc_detect(void)
-{
-	return 1;
-}
-
 static struct pxa2xx_udc_mach_info stargate2_udc_info __initdata = {
-	.udc_is_connected	= sg2_udc_detect,
 	.udc_command		= sg2_udc_command,
 };
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (2 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 03/15] ARM: pxa/stargate2: " Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:47   ` Felipe Balbi
  2011-07-05 13:08 ` [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver Dmitry Eremin-Solenikov
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Move all handling of lubbock board to separate lubbock-usb transceiver,
removing cruft from pxa25x_udc.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/usb/gadget/pxa25x_udc.c |   74 ----------------
 drivers/usb/otg/Kconfig         |   10 ++
 drivers/usb/otg/Makefile        |    1 +
 drivers/usb/otg/lubbock-usb.c   |  178 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 189 insertions(+), 74 deletions(-)
 create mode 100644 drivers/usb/otg/lubbock-usb.c

diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 7745454..6f543c7 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -66,10 +66,6 @@
 #include <mach/pxa25x-udc.h>
 #endif
 
-#ifdef CONFIG_ARCH_LUBBOCK
-#include <mach/lubbock.h>
-#endif
-
 #include <asm/mach/udc_pxa2xx.h>
 
 
@@ -1384,42 +1380,6 @@ EXPORT_SYMBOL(usb_gadget_unregister_driver);
 
 /*-------------------------------------------------------------------------*/
 
-#ifdef CONFIG_ARCH_LUBBOCK
-
-/* Lubbock has separate connect and disconnect irqs.  More typical designs
- * use one GPIO as the VBUS IRQ, and another to control the D+ pullup.
- */
-
-static irqreturn_t
-lubbock_vbus_irq(int irq, void *_dev)
-{
-	struct pxa25x_udc	*dev = _dev;
-	int			vbus;
-
-	dev->stats.irqs++;
-	switch (irq) {
-	case LUBBOCK_USB_IRQ:
-		vbus = 1;
-		disable_irq(LUBBOCK_USB_IRQ);
-		enable_irq(LUBBOCK_USB_DISC_IRQ);
-		break;
-	case LUBBOCK_USB_DISC_IRQ:
-		vbus = 0;
-		disable_irq(LUBBOCK_USB_DISC_IRQ);
-		enable_irq(LUBBOCK_USB_IRQ);
-		break;
-	default:
-		return IRQ_NONE;
-	}
-
-	pxa25x_udc_vbus_session(&dev->gadget, vbus);
-	return IRQ_HANDLED;
-}
-
-#endif
-
-
-/*-------------------------------------------------------------------------*/
 
 static inline void clear_ep_state (struct pxa25x_udc *dev)
 {
@@ -2207,38 +2167,10 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
 	}
 	dev->got_irq = 1;
 
-#ifdef CONFIG_ARCH_LUBBOCK
-	if (machine_is_lubbock()) {
-		retval = request_irq(LUBBOCK_USB_DISC_IRQ,
-				lubbock_vbus_irq,
-				IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
-				driver_name, dev);
-		if (retval != 0) {
-			pr_err("%s: can't get irq %i, err %d\n",
-				driver_name, LUBBOCK_USB_DISC_IRQ, retval);
-			goto err_irq_lub;
-		}
-		retval = request_irq(LUBBOCK_USB_IRQ,
-				lubbock_vbus_irq,
-				IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
-				driver_name, dev);
-		if (retval != 0) {
-			pr_err("%s: can't get irq %i, err %d\n",
-				driver_name, LUBBOCK_USB_IRQ, retval);
-			goto lubbock_fail0;
-		}
-	} else
-#endif
 	create_debug_files(dev);
 
 	return 0;
 
-#ifdef	CONFIG_ARCH_LUBBOCK
-lubbock_fail0:
-	free_irq(LUBBOCK_USB_DISC_IRQ, dev);
- err_irq_lub:
-	free_irq(irq, dev);
-#endif
  err_irq1:
 	if (gpio_is_valid(dev->mach->gpio_pullup))
 		gpio_free(dev->mach->gpio_pullup);
@@ -2273,12 +2205,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
 		free_irq(platform_get_irq(pdev, 0), dev);
 		dev->got_irq = 0;
 	}
-#ifdef CONFIG_ARCH_LUBBOCK
-	if (machine_is_lubbock()) {
-		free_irq(LUBBOCK_USB_DISC_IRQ, dev);
-		free_irq(LUBBOCK_USB_IRQ, dev);
-	}
-#endif
 	if (gpio_is_valid(dev->mach->gpio_pullup))
 		gpio_free(dev->mach->gpio_pullup);
 
diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index c66481a..cf3a245 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -122,6 +122,16 @@ config AB8500_USB
           This transceiver supports high and full speed devices plus,
           in host mode, low speed.
 
+config LUBBOCK_USB
+	tristate "Intel DBPXA250 (Lubbock) Tranceiver Driver"
+	depends on ARCH_LUBBOCK
+        select USB_OTG_UTILS
+	help
+	  Enable this to support the USB UDC connectivity on Intel DBPXA250
+	  development platform (so-called Lubbock).
+	  This driver is of no use for all other platforms, so if you are
+	  using other board, you can safely say N here.
+
 config FSL_USB2_OTG
 	bool "Freescale USB OTG Transceiver Driver"
 	depends on USB_EHCI_FSL && USB_GADGET_FSL_USB2
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index 566655c..24d4e63 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -19,5 +19,6 @@ obj-$(CONFIG_USB_ULPI)		+= ulpi.o
 obj-$(CONFIG_USB_ULPI_VIEWPORT)	+= ulpi_viewport.o
 obj-$(CONFIG_USB_MSM_OTG)	+= msm_otg.o
 obj-$(CONFIG_AB8500_USB)	+= ab8500-usb.o
+obj-$(CONFIG_LUBBOCK_USB)	+= lubbock-usb.o
 fsl_usb2_otg-objs		:= fsl_otg.o otg_fsm.o
 obj-$(CONFIG_FSL_USB2_OTG)	+= fsl_usb2_otg.o
diff --git a/drivers/usb/otg/lubbock-usb.c b/drivers/usb/otg/lubbock-usb.c
new file mode 100644
index 0000000..3ff8297
--- /dev/null
+++ b/drivers/usb/otg/lubbock-usb.c
@@ -0,0 +1,178 @@
+/*
+ * Intel DBPXA250 Development Platform USB UDC support
+ *
+ * Copyright (C) 2011 Dmitry Eremin-Solenikov
+ *
+ * Based on pxa25x_udc driver:
+ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker)
+ * Copyright (C) 2003 Robert Schwebel, Pengutronix
+ * Copyright (C) 2003 Benedikt Spranger, Pengutronix
+ * Copyright (C) 2003 David Brownell
+ * Copyright (C) 2003 Joshua Wise
+ *
+ * Largely based on lubbock-usb-xceiv:
+ * Copyright (C) 2009 Texas Instruments Inc
+ */
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/dma-mapping.h>
+#include <linux/usb.h>
+#include <linux/usb/gadget.h>
+#include <linux/usb/otg.h>
+#include <linux/slab.h>
+#include <linux/interrupt.h>
+
+#include <mach/lubbock.h>
+
+static int lubbock_udc_is_connected(void)
+{
+	return (LUB_MISC_RD & (1 << 9)) == 0;
+}
+
+static int lubbock_set_peripheral(struct otg_transceiver *lubbock,
+		struct usb_gadget *gadget)
+{
+	if (!lubbock)
+		return -ENODEV;
+
+	if (!gadget) {
+		lubbock->gadget = NULL;
+		return 0;
+	}
+
+	lubbock->gadget = gadget;
+	lubbock->state = OTG_STATE_B_IDLE;
+	if (lubbock_udc_is_connected()) {
+		lubbock->state = OTG_STATE_B_PERIPHERAL;
+		usb_gadget_vbus_connect(lubbock->gadget);
+	}
+
+	return 0;
+}
+
+/* Lubbock has separate connect and disconnect irqs.  More typical designs
+ * use one GPIO as the VBUS IRQ, and another to control the D+ pullup.
+ */
+
+static irqreturn_t
+lubbock_vbus_irq(int irq, void *_dev)
+{
+	struct otg_transceiver *lubbock = _dev;
+	switch (irq) {
+	case LUBBOCK_USB_IRQ:
+		lubbock->state = OTG_STATE_B_PERIPHERAL;
+		usb_gadget_vbus_connect(lubbock->gadget);
+
+		disable_irq(LUBBOCK_USB_IRQ);
+		enable_irq(LUBBOCK_USB_DISC_IRQ);
+		break;
+	case LUBBOCK_USB_DISC_IRQ:
+		usb_gadget_vbus_disconnect(lubbock->gadget);
+		lubbock->state = OTG_STATE_B_IDLE;
+
+		disable_irq(LUBBOCK_USB_DISC_IRQ);
+		enable_irq(LUBBOCK_USB_IRQ);
+		break;
+	default:
+		return IRQ_NONE;
+	}
+
+	return IRQ_HANDLED;
+}
+
+
+static int __devinit lubbock_usb_xceiv_probe(struct platform_device *pdev)
+{
+	struct otg_transceiver	*lubbock;
+	int err;
+
+	lubbock = kzalloc(sizeof *lubbock, GFP_KERNEL);
+	if (!lubbock)
+		return -ENOMEM;
+
+	lubbock->dev		= &pdev->dev;
+	lubbock->label		= "lubbock-xceiv";
+	lubbock->state		= OTG_STATE_UNDEFINED;
+	lubbock->set_peripheral	= lubbock_set_peripheral;
+
+	err = request_irq(LUBBOCK_USB_DISC_IRQ,
+			lubbock_vbus_irq,
+			IRQF_DISABLED,
+			lubbock->label, lubbock);
+	if (err != 0) {
+		pr_err("%s: can't get irq %i, err %d\n",
+			lubbock->label, LUBBOCK_USB_DISC_IRQ, err);
+		goto err_irq_lub;
+	}
+	err = request_irq(LUBBOCK_USB_IRQ,
+			lubbock_vbus_irq,
+			IRQF_DISABLED,
+			lubbock->label, lubbock);
+	if (err != 0) {
+		pr_err("%s: can't get irq %i, err %d\n",
+			lubbock->label, LUBBOCK_USB_IRQ, err);
+		goto err_irq_lub2;
+	}
+
+	err = otg_set_transceiver(lubbock);
+	if (err) {
+		dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
+			err);
+		goto exit;
+	}
+
+	platform_set_drvdata(pdev, lubbock);
+
+	ATOMIC_INIT_NOTIFIER_HEAD(&lubbock->notifier);
+
+	return 0;
+exit:
+	free_irq(LUBBOCK_USB_IRQ, lubbock);
+err_irq_lub2:
+	free_irq(LUBBOCK_USB_DISC_IRQ, lubbock);
+err_irq_lub:
+	kfree(lubbock);
+	return err;
+}
+
+static int __devexit lubbock_usb_xceiv_remove(struct platform_device *pdev)
+{
+	struct otg_transceiver *lubbock = platform_get_drvdata(pdev);
+
+	otg_set_transceiver(NULL);
+
+	platform_set_drvdata(pdev, NULL);
+
+	free_irq(LUBBOCK_USB_IRQ, lubbock);
+	free_irq(LUBBOCK_USB_DISC_IRQ, lubbock);
+
+	kfree(lubbock);
+
+	return 0;
+}
+
+static struct platform_driver lubbock_usb_xceiv_driver = {
+	.probe		= lubbock_usb_xceiv_probe,
+	.remove		= __devexit_p(lubbock_usb_xceiv_remove),
+	.driver		= {
+		.name	= "lubbock_usb_xceiv",
+		.owner	= THIS_MODULE,
+	},
+};
+
+static int __init lubbock_usb_xceiv_init(void)
+{
+	return platform_driver_register(&lubbock_usb_xceiv_driver);
+}
+subsys_initcall(lubbock_usb_xceiv_init);
+
+static void __exit lubbock_usb_xceiv_exit(void)
+{
+	platform_driver_unregister(&lubbock_usb_xceiv_driver);
+}
+module_exit(lubbock_usb_xceiv_exit);
+
+MODULE_ALIAS("platform:lubbock_usb_xceiv");
+MODULE_DESCRIPTION("lubbock USB Transceiver driver");
+MODULE_LICENSE("GPL");
+
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (3 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 14:47   ` Sergei Shtylyov
  2011-07-05 13:08 ` [PATCH 06/15] pxa: drop handling of udc_is_connected Dmitry Eremin-Solenikov
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-pxa/lubbock.c |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index e10ddb8..4dcc687 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -198,16 +198,6 @@ device_initcall(lubbock_irq_device_init);
 
 #endif
 
-static int lubbock_udc_is_connected(void)
-{
-	return (LUB_MISC_RD & (1 << 9)) == 0;
-}
-
-static struct pxa2xx_udc_mach_info udc_info __initdata = {
-	.udc_is_connected	= lubbock_udc_is_connected,
-	// no D+ pullup; lubbock can't connect/disconnect in software
-};
-
 static struct resource sa1111_resources[] = {
 	[0] = {
 		.start	= 0x10000000,
@@ -379,11 +369,17 @@ static struct platform_device lubbock_flash_device[2] = {
 	},
 };
 
+static struct platform_device lubbock_usb_xceiv = {
+	.name	= "lubbock_usb_xceiv",
+	.id	= -1,
+};
+
 static struct platform_device *devices[] __initdata = {
 	&sa1111_device,
 	&smc91x_device,
 	&lubbock_flash_device[0],
 	&lubbock_flash_device[1],
+	&lubbock_usb_xceiv,
 };
 
 static struct pxafb_mode_info sharp_lm8v31_mode = {
@@ -511,7 +507,6 @@ static void __init lubbock_init(void)
 	pxa_set_stuart_info(NULL);
 
 	clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
-	pxa_set_udc_info(&udc_info);
 	pxa_set_fb_info(NULL, &sharp_lm8v31);
 	pxa_set_mci_info(&lubbock_mci_platform_data);
 	pxa_set_ficp_info(&lubbock_ficp_platform_data);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 06/15] pxa: drop handling of udc_is_connected
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (4 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 07/15] pxa25x_udc: drop support for udc_command Dmitry Eremin-Solenikov
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

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 -
 1 files changed, 0 insertions(+), 1 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 */
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (5 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 06/15] pxa: drop handling of udc_is_connected Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:46   ` Felipe Balbi
  2011-07-05 13:08 ` [PATCH 08/15] otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing Dmitry Eremin-Solenikov
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

None of pxa25x devices use udc_command() for UDC functionality.
Stop calling this callback from pxa25x_udc code.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/usb/gadget/pxa25x_udc.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 6f543c7..aa34698 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -144,8 +144,6 @@ static void pullup_off(void)
 
 	if (gpio_is_valid(mach->gpio_pullup))
 		gpio_set_value(mach->gpio_pullup, off_level);
-	else if (mach->udc_command)
-		mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
 }
 
 static void pullup_on(void)
@@ -155,8 +153,6 @@ static void pullup_on(void)
 
 	if (gpio_is_valid(mach->gpio_pullup))
 		gpio_set_value(mach->gpio_pullup, on_level);
-	else if (mach->udc_command)
-		mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
 }
 
 static void pio_irq_enable(int bEndpointAddress)
@@ -984,7 +980,7 @@ static int pxa25x_udc_pullup(struct usb_gadget *_gadget, int is_active)
 	udc = container_of(_gadget, struct pxa25x_udc, gadget);
 
 	/* not all boards support pullup control */
-	if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
+	if (!gpio_is_valid(udc->mach->gpio_pullup))
 		return -EOPNOTSUPP;
 
 	udc->pullup = (is_active != 0);
@@ -2241,7 +2237,7 @@ static int pxa25x_udc_suspend(struct platform_device *dev, pm_message_t state)
 	struct pxa25x_udc	*udc = platform_get_drvdata(dev);
 	unsigned long flags;
 
-	if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
+	if (!gpio_is_valid(udc->mach->gpio_pullup))
 		WARNING("USB host won't detect disconnect!\n");
 	udc->suspended = 1;
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 08/15] otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (6 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 07/15] pxa25x_udc: drop support for udc_command Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 09/15] corgi: convert to use gpio-pullup Dmitry Eremin-Solenikov
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

There are some devices which have D+ pullup GPIO, but no VBUS sensing
support. As such they can't be supported by gpio-vbus transceiver but
would benefit from OTG transceiver interface support. Provide simple
driver that would just handle OTG API for gadgete drivers and provide a
way to toggle D+ pullup.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/usb/otg/Kconfig       |    8 ++
 drivers/usb/otg/Makefile      |    1 +
 drivers/usb/otg/gpio_pullup.c |  159 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/otg/gpio_pullup.c

diff --git a/drivers/usb/otg/Kconfig b/drivers/usb/otg/Kconfig
index cf3a245..18b9183 100644
--- a/drivers/usb/otg/Kconfig
+++ b/drivers/usb/otg/Kconfig
@@ -140,4 +140,12 @@ config FSL_USB2_OTG
 	help
 	  Enable this to support Freescale USB OTG transceiver.
 
+config USB_GPIO_PULLUP
+	tristate "GPIO based peripheral-only D+ pullup handling"
+	depends on GENERIC_GPIO
+	select USB_OTG_UTILS
+	help
+	  Provides simple GPIO D+ pullup handling for controllers with
+	  internal transceiver via the otg_transceiver interface.
+
 endif # USB || OTG
diff --git a/drivers/usb/otg/Makefile b/drivers/usb/otg/Makefile
index 24d4e63..b482e79 100644
--- a/drivers/usb/otg/Makefile
+++ b/drivers/usb/otg/Makefile
@@ -22,3 +22,4 @@ obj-$(CONFIG_AB8500_USB)	+= ab8500-usb.o
 obj-$(CONFIG_LUBBOCK_USB)	+= lubbock-usb.o
 fsl_usb2_otg-objs		:= fsl_otg.o otg_fsm.o
 obj-$(CONFIG_FSL_USB2_OTG)	+= fsl_usb2_otg.o
+obj-$(CONFIG_USB_GPIO_PULLUP)	+= gpio_pullup.o
diff --git a/drivers/usb/otg/gpio_pullup.c b/drivers/usb/otg/gpio_pullup.c
new file mode 100644
index 0000000..075d269
--- /dev/null
+++ b/drivers/usb/otg/gpio_pullup.c
@@ -0,0 +1,159 @@
+/*
+ * gpio_pullup.c - simple GPIO D+ pullup handling for B peripheral devices
+ *
+ * Copyright (c) 2011 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+ *
+ * Heavily based on gpio_vbus driver:
+ *
+ * Copyright (c) 2008 Philipp Zabel <philipp.zabel@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/gpio.h>
+#include <linux/usb.h>
+
+#include <linux/usb/gadget.h>
+#include <linux/usb/gpio_vbus.h>
+#include <linux/usb/otg.h>
+
+struct gpio_pullup_data {
+	struct otg_transceiver otg;
+	struct device          *dev;
+};
+
+/* OTG transceiver interface */
+
+/* bind/unbind the peripheral controller */
+static int gpio_pullup_set_peripheral(struct otg_transceiver *otg,
+				struct usb_gadget *gadget)
+{
+	struct gpio_pullup_data *gpio_pullup;
+	struct gpio_vbus_mach_info *pdata;
+	struct platform_device *pdev;
+	int gpio;
+
+	gpio_pullup = container_of(otg, struct gpio_pullup_data, otg);
+	pdev = to_platform_device(gpio_pullup->dev);
+	pdata = gpio_pullup->dev->platform_data;
+	gpio = pdata->gpio_pullup;
+
+	if (!gadget) {
+		dev_dbg(&pdev->dev, "unregistering gadget '%s'\n",
+			otg->gadget->name);
+
+		/* optionally disable D+ pullup */
+		gpio_set_value(pdata->gpio_pullup, pdata->gpio_pullup_inverted);
+
+		usb_gadget_vbus_disconnect(otg->gadget);
+		otg->state = OTG_STATE_UNDEFINED;
+
+		otg->gadget = NULL;
+		return 0;
+	}
+
+	otg->gadget = gadget;
+	dev_dbg(&pdev->dev, "registered gadget '%s'\n", gadget->name);
+
+	/* initialize connection state */
+	gpio_pullup->otg.state = OTG_STATE_B_PERIPHERAL;
+	usb_gadget_vbus_connect(gpio_pullup->otg.gadget);
+
+	gpio_set_value(pdata->gpio_pullup, !pdata->gpio_pullup_inverted);
+
+	return 0;
+}
+
+/* platform driver interface */
+
+static int __devinit gpio_pullup_probe(struct platform_device *pdev)
+{
+	struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data;
+	struct gpio_pullup_data *gpio_pullup;
+	int err, gpio;
+
+	if (!pdata || !gpio_is_valid(pdata->gpio_pullup))
+		return -EINVAL;
+
+	gpio_pullup = kzalloc(sizeof(struct gpio_pullup_data), GFP_KERNEL);
+	if (!gpio_pullup)
+		return -ENOMEM;
+
+	platform_set_drvdata(pdev, gpio_pullup);
+	gpio_pullup->dev = &pdev->dev;
+	gpio_pullup->otg.label = "gpio-pullup";
+	gpio_pullup->otg.state = OTG_STATE_UNDEFINED;
+	gpio_pullup->otg.set_peripheral = gpio_pullup_set_peripheral;
+
+	/* if data line pullup is in use, initialize it to "not pulling up" */
+	gpio = pdata->gpio_pullup;
+	err = gpio_request(gpio, "udc_pullup");
+	if (err) {
+		dev_err(&pdev->dev,
+			"can't request pullup gpio %d, err: %d\n",
+			gpio, err);
+		gpio_free(pdata->gpio_pullup);
+		goto err_gpio;
+	}
+	gpio_direction_output(gpio, pdata->gpio_pullup_inverted);
+
+	/* only active when a gadget is registered */
+	err = otg_set_transceiver(&gpio_pullup->otg);
+	if (err) {
+		dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
+			err);
+		goto err_otg;
+	}
+
+	return 0;
+err_otg:
+	gpio_free(pdata->gpio_pullup);
+err_gpio:
+	platform_set_drvdata(pdev, NULL);
+	kfree(gpio_pullup);
+	return err;
+}
+
+static int __devexit gpio_pullup_remove(struct platform_device *pdev)
+{
+	struct gpio_pullup_data *gpio_pullup = platform_get_drvdata(pdev);
+	struct gpio_vbus_mach_info *pdata = pdev->dev.platform_data;
+
+	otg_set_transceiver(NULL);
+
+	gpio_free(pdata->gpio_pullup);
+	platform_set_drvdata(pdev, NULL);
+	kfree(gpio_pullup);
+
+	return 0;
+}
+
+static struct platform_driver gpio_pullup_driver = {
+	.driver = {
+		.name  = "gpio-pullup",
+		.owner = THIS_MODULE,
+	},
+	.probe		= gpio_pullup_probe,
+	.remove		= __devexit_p(gpio_pullup_remove),
+};
+MODULE_ALIAS("platform:gpio-pullup");
+
+static int __init gpio_pullup_init(void)
+{
+	return platform_driver_register(&gpio_pullup_driver);
+}
+module_init(gpio_pullup_init);
+
+static void __exit gpio_pullup_exit(void)
+{
+	platform_driver_unregister(&gpio_pullup_driver);
+}
+module_exit(gpio_pullup_exit);
+
+MODULE_DESCRIPTION("simple GPIO D+ pulllup OTG transceiver driver");
+MODULE_AUTHOR("Dmitry Eremin-Solenikov");
+MODULE_LICENSE("GPL");
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 09/15] corgi: convert to use gpio-pullup
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (7 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 08/15] otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 10/15] poodle: " Dmitry Eremin-Solenikov
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Convert to use gpio-pullup transceiver instead of relying on UDC driver managing GPIO.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-pxa/corgi.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 3a5507e..dd7b6a7 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -32,6 +32,7 @@
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/mtd/sharpsl.h>
 #include <linux/input/matrix_keypad.h>
+#include <linux/usb/gpio_vbus.h>
 #include <video/w100fb.h>
 
 #include <asm/setup.h>
@@ -48,7 +49,6 @@
 #include <mach/pxa25x.h>
 #include <mach/irda.h>
 #include <mach/mmc.h>
-#include <mach/udc.h>
 #include <mach/corgi.h>
 #include <mach/sharpsl_pm.h>
 
@@ -461,11 +461,19 @@ static struct pxaficp_platform_data corgi_ficp_platform_data = {
 /*
  * USB Device Controller
  */
-static struct pxa2xx_udc_mach_info udc_info __initdata = {
+static struct gpio_vbus_mach_info udc_info = {
 	/* no connect GPIO; corgi can't tell connection status */
 	.gpio_pullup		= CORGI_GPIO_USB_PULLUP,
 };
 
+static struct platform_device corgi_gpio_pullup = {
+	.name	= "gpio-pullup",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &udc_info,
+	},
+};
+
 #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MASTER)
 static struct pxa2xx_spi_master corgi_spi_info = {
 	.num_chipselect	= 3,
@@ -642,6 +650,7 @@ static struct platform_device *devices[] __initdata = {
 	&corgiled_device,
 	&sharpsl_nand_device,
 	&sharpsl_rom_device,
+	&corgi_gpio_pullup,
 };
 
 static struct i2c_board_info __initdata corgi_i2c_devices[] = {
@@ -691,7 +700,6 @@ static void __init corgi_init(void)
 
 	corgi_init_spi();
 
- 	pxa_set_udc_info(&udc_info);
 	pxa_set_mci_info(&corgi_mci_platform_data);
 	pxa_set_ficp_info(&corgi_ficp_platform_data);
 	pxa_set_i2c_info(NULL);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 10/15] poodle: convert to use gpio-pullup
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (8 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 09/15] corgi: convert to use gpio-pullup Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 11/15] h5000: " Dmitry Eremin-Solenikov
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Convert to use gpio-pullup transceiver instead of relying on UDC driver managing GPIO.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-pxa/poodle.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 16d14fd..01aed35 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -28,6 +28,7 @@
 #include <linux/spi/ads7846.h>
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/mtd/sharpsl.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -41,7 +42,6 @@
 
 #include <mach/pxa25x.h>
 #include <mach/mmc.h>
-#include <mach/udc.h>
 #include <mach/irda.h>
 #include <mach/poodle.h>
 #include <mach/pxafb.h>
@@ -297,11 +297,18 @@ static struct pxaficp_platform_data poodle_ficp_platform_data = {
 /*
  * USB Device Controller
  */
-static struct pxa2xx_udc_mach_info udc_info __initdata = {
+static struct gpio_vbus_mach_info udc_info = {
 	/* no connect GPIO; poodle can't tell connection status */
 	.gpio_pullup	= POODLE_GPIO_USB_PULLUP,
 };
 
+static struct platform_device poodle_gpio_pullup = {
+	.name	= "gpio-pullup",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &udc_info,
+	},
+};
 
 /* PXAFB device */
 static struct pxafb_mode_info poodle_fb_mode = {
@@ -408,6 +415,7 @@ static struct platform_device *devices[] __initdata = {
 	&poodle_scoop_device,
 	&sharpsl_nand_device,
 	&sharpsl_rom_device,
+	&poodle_gpio_pullup,
 };
 
 static struct i2c_board_info __initdata poodle_i2c_devices[] = {
@@ -446,7 +454,6 @@ static void __init poodle_init(void)
 		pr_warning("poodle: Unable to register LoCoMo device\n");
 
 	pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info);
-	pxa_set_udc_info(&udc_info);
 	pxa_set_mci_info(&poodle_mci_platform_data);
 	pxa_set_ficp_info(&poodle_ficp_platform_data);
 	pxa_set_i2c_info(NULL);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 11/15] h5000: convert to use gpio-pullup
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (9 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 10/15] poodle: " Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 12/15] gpio-vbus: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Convert to use gpio-pullup transceiver instead of relying on UDC driver managing GPIO.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-pxa/h5000.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index 657db46..4b3ca92 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -24,6 +24,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -31,7 +32,6 @@
 
 #include <mach/pxa25x.h>
 #include <mach/h5000.h>
-#include <mach/udc.h>
 #include <mach/smemc.h>
 
 #include "generic.h"
@@ -117,10 +117,18 @@ static struct platform_device h5000_flash[] = {
  * USB Device Controller
  */
 
-static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata = {
+static struct gpio_vbus_mach_info h5000_udc_mach_info = {
 	.gpio_pullup = H5000_GPIO_USB_PULLUP,
 };
 
+static struct platform_device h5000_gpio_pullup = {
+	.name	= "gpio-pullup",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &h5000_udc_mach_info,
+	},
+};
+
 /*
  * GPIO setup
  */
@@ -187,6 +195,7 @@ static void fix_msc(void)
 static struct platform_device *devices[] __initdata = {
 	&h5000_flash[0],
 	&h5000_flash[1],
+	&h5000_gpio_pullup,
 };
 
 static void __init h5000_init(void)
@@ -197,7 +206,6 @@ static void __init h5000_init(void)
 	pxa_set_ffuart_info(NULL);
 	pxa_set_btuart_info(NULL);
 	pxa_set_stuart_info(NULL);
-	pxa_set_udc_info(&h5000_udc_mach_info);
 	platform_add_devices(ARRAY_AND_SIZE(devices));
 }
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 12/15] gpio-vbus: support disabling D+ pullup on suspend
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (10 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 11/15] h5000: " Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 13/15] mioa701: move gpio-pullup functionality to gpio-vbus Dmitry Eremin-Solenikov
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Some platforms would like to disable D+ pullup on suspend, to drain as
low power, as possible. E.g. this was requested by mioa701 board
maintainers.

Suspend/resume is done in _noirq path, to force handling of pullup after
the main UDC driver suspend/before resume.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/usb/otg/gpio_vbus.c   |   42 +++++++++++++++++++++++++++++++++++++++++
 include/linux/usb/gpio_vbus.h |    1 +
 2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c
index 52733d9..3b27b1f 100644
--- a/drivers/usb/otg/gpio_vbus.c
+++ b/drivers/usb/otg/gpio_vbus.c
@@ -327,6 +327,47 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int gpio_vbus_suspend(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev);
+	struct gpio_vbus_mach_info *pdata = gpio_vbus->dev->platform_data;
+
+	if (gpio_vbus->otg.gadget && pdata->disconnect_on_suspend) {
+		/* optionally disable D+ pullup */
+		if (gpio_is_valid(pdata->gpio_pullup))
+			gpio_set_value(pdata->gpio_pullup,
+					pdata->gpio_pullup_inverted);
+
+		set_vbus_draw(gpio_vbus, 0);
+	}
+	return 0;
+}
+
+static int gpio_vbus_resume(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct gpio_vbus_data *gpio_vbus = platform_get_drvdata(pdev);
+
+	if (gpio_vbus->otg.gadget)
+		schedule_work(&gpio_vbus->work);
+
+	return 0;
+}
+static const struct dev_pm_ops gpio_vbus_pm_ops = {
+	.suspend_noirq = gpio_vbus_suspend,
+	.resume_noirq = gpio_vbus_resume,
+	.freeze_noirq = gpio_vbus_suspend,
+	.thaw_noirq = gpio_vbus_resume,
+	.poweroff_noirq = gpio_vbus_suspend,
+	.restore_noirq = gpio_vbus_resume,
+};
+#define GPIO_VBUS_PM_OPS (&gpio_vbus_pm_ops)
+#else
+#define GPIO_VBUS_PM_OPS NULL
+#endif
+
 /* NOTE:  the gpio-vbus device may *NOT* be hotplugged */
 
 MODULE_ALIAS("platform:gpio-vbus");
@@ -335,6 +376,7 @@ static struct platform_driver gpio_vbus_driver = {
 	.driver = {
 		.name  = "gpio-vbus",
 		.owner = THIS_MODULE,
+		.pm = GPIO_VBUS_PM_OPS,
 	},
 	.remove  = __exit_p(gpio_vbus_remove),
 };
diff --git a/include/linux/usb/gpio_vbus.h b/include/linux/usb/gpio_vbus.h
index d9f03cc..2faa38d 100644
--- a/include/linux/usb/gpio_vbus.h
+++ b/include/linux/usb/gpio_vbus.h
@@ -27,4 +27,5 @@ struct gpio_vbus_mach_info {
 	int gpio_pullup;
 	bool gpio_vbus_inverted;
 	bool gpio_pullup_inverted;
+	bool disconnect_on_suspend;
 };
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 13/15] mioa701: move gpio-pullup functionality to gpio-vbus
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (11 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 12/15] gpio-vbus: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 14/15] gpio-pullup: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

gpio-vbus can (and should?) handle D+ pullup gpio for us. Move
gpio-pullup handling to gpio-vbus and stop providing udc_info as it's
empty now. Also tell gpio-vbus that it should disable D+ pullup on
suspend, as did pxa27x_udc driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-pxa/mioa701.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index d833a26..96c377c 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -402,14 +402,11 @@ static void gsm_exit(void)
 /*
  * USB UDC
  */
-static struct pxa2xx_udc_mach_info mioa701_udc_info = {
-	.gpio_pullup	  = GPIO22_USB_ENABLE,
-};
-
 struct gpio_vbus_mach_info gpio_vbus_data = {
 	.gpio_vbus = GPIO13_nUSB_DETECT,
 	.gpio_vbus_inverted = 1,
-	.gpio_pullup = -1,
+	.gpio_pullup = GPIO22_USB_ENABLE,
+	.disconnect_on_suspend = 1,
 };
 
 /*
@@ -770,7 +767,6 @@ static void __init mioa701_machine_init(void)
 	pxa_set_fb_info(NULL, &mioa701_pxafb_info);
 	pxa_set_mci_info(&mioa701_mci_info);
 	pxa_set_keypad_info(&mioa701_keypad_info);
-	pxa_set_udc_info(&mioa701_udc_info);
 	pxa_set_ac97_info(&mioa701_ac97_info);
 	pm_power_off = mioa701_poweroff;
 	arm_pm_restart = mioa701_restart;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 14/15] gpio-pullup: support disabling D+ pullup on suspend
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (12 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 13/15] mioa701: move gpio-pullup functionality to gpio-vbus Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:08 ` [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling Dmitry Eremin-Solenikov
  2011-07-05 13:45 ` [PATCH 00/15] Big pxa2[57]x_udc cleanup Eric Miao
  15 siblings, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

As it's done by gpio-vbus, support disabling D+ pullup on suspend to
save power.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/usb/otg/gpio_pullup.c |   45 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/otg/gpio_pullup.c b/drivers/usb/otg/gpio_pullup.c
index 075d269..14c3322 100644
--- a/drivers/usb/otg/gpio_pullup.c
+++ b/drivers/usb/otg/gpio_pullup.c
@@ -132,10 +132,55 @@ static int __devexit gpio_pullup_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static int gpio_pullup_suspend(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct gpio_pullup_data *gpio_pullup = platform_get_drvdata(pdev);
+	struct gpio_vbus_mach_info *pdata = gpio_pullup->dev->platform_data;
+
+	/* optionally disable D+ pullup */
+	if (gpio_pullup->otg.gadget && pdata->disconnect_on_suspend)
+		gpio_set_value(pdata->gpio_pullup,
+				pdata->gpio_pullup_inverted);
+
+	return 0;
+}
+
+static int gpio_pullup_resume(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct gpio_pullup_data *gpio_pullup = platform_get_drvdata(pdev);
+	struct gpio_vbus_mach_info *pdata = gpio_pullup->dev->platform_data;
+
+	if (gpio_pullup->otg.gadget)
+		gpio_set_value(pdata->gpio_pullup,
+				!pdata->gpio_pullup_inverted);
+
+	return 0;
+}
+static const struct dev_pm_ops gpio_pullup_pm_ops = {
+	.suspend_noirq = gpio_pullup_suspend,
+	.resume_noirq = gpio_pullup_resume,
+	.freeze_noirq = gpio_pullup_suspend,
+	.thaw_noirq = gpio_pullup_resume,
+	.poweroff_noirq = gpio_pullup_suspend,
+	.restore_noirq = gpio_pullup_resume,
+};
+#define GPIO_PULLUP_PM_OPS (&gpio_pullup_pm_ops)
+#else
+#define GPIO_PULLUP_PM_OPS NULL
+#endif
+
+/* NOTE:  the gpio-pullup device may *NOT* be hotplugged */
+
+MODULE_ALIAS("platform:gpio-pullup");
+
 static struct platform_driver gpio_pullup_driver = {
 	.driver = {
 		.name  = "gpio-pullup",
 		.owner = THIS_MODULE,
+		.pm = GPIO_PULLUP_PM_OPS,
 	},
 	.probe		= gpio_pullup_probe,
 	.remove		= __devexit_p(gpio_pullup_remove),
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (13 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 14/15] gpio-pullup: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
@ 2011-07-05 13:08 ` Dmitry Eremin-Solenikov
  2011-07-05 13:49   ` Felipe Balbi
  2011-07-05 20:42   ` Robert Jarzmik
  2011-07-05 13:45 ` [PATCH 00/15] Big pxa2[57]x_udc cleanup Eric Miao
  15 siblings, 2 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 13:08 UTC (permalink / raw)
  To: linux-arm-kernel

Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
handling from pxa UDC drivers, thus simplifying them a bit.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/include/asm/mach/udc_pxa2xx.h |    8 -----
 arch/arm/mach-pxa/balloon3.c           |    1 -
 arch/arm/mach-pxa/colibri-pxa320.c     |    1 -
 arch/arm/mach-pxa/devices.c            |    2 +-
 arch/arm/mach-pxa/vpac270.c            |    1 -
 drivers/usb/gadget/pxa25x_udc.c        |   54 --------------------------------
 drivers/usb/gadget/pxa27x_udc.c        |   27 +---------------
 7 files changed, 3 insertions(+), 91 deletions(-)

diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h
index f0719d3..4cab1d6 100644
--- a/arch/arm/include/asm/mach/udc_pxa2xx.h
+++ b/arch/arm/include/asm/mach/udc_pxa2xx.h
@@ -13,13 +13,5 @@ struct pxa2xx_udc_mach_info {
         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 */
-
-	/* Boards following the design guidelines in the developer's manual,
-	 * with on-chip GPIOs not Lubbock's weird hardware, can have a sane
-	 * VBUS IRQ and omit the methods above.  Store the GPIO number
-	 * here.  Note that sometimes the signals go through inverters...
-	 */
-	bool	gpio_pullup_inverted;
-	int	gpio_pullup;			/* high == pullup activated */
 };
 
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index 4d0d8c3..a420c1e 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -318,7 +318,6 @@ static void balloon3_udc_command(int cmd)
 
 static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = {
 	.udc_command		= balloon3_udc_command,
-	.gpio_pullup		= -1,
 };
 
 static void __init balloon3_udc_init(void)
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index ff9ff5f..f799b0a 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -171,7 +171,6 @@ static void colibri_pxa320_udc_command(int cmd)
 
 static struct pxa2xx_udc_mach_info colibri_pxa320_udc_info __initdata = {
 	.udc_command		= colibri_pxa320_udc_command,
-	.gpio_pullup		= -1,
 };
 
 static void __init colibri_pxa320_init_udc(void)
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 2e04254..59a3578 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -89,7 +89,7 @@ void __init pxa_set_mci_info(struct pxamci_platform_data *info)
 
 
 static struct pxa2xx_udc_mach_info pxa_udc_info = {
-	.gpio_pullup = -1,
+	.udc_command = NULL,
 };
 
 void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info)
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 67bd414..3641935 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -367,7 +367,6 @@ static void vpac270_udc_command(int cmd)
 
 static struct pxa2xx_udc_mach_info vpac270_udc_info __initdata = {
 	.udc_command		= vpac270_udc_command,
-	.gpio_pullup		= -1,
 };
 
 static void __init vpac270_udc_init(void)
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index aa34698..221fe19 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -50,7 +50,6 @@
 
 #include <asm/byteorder.h>
 #include <asm/dma.h>
-#include <asm/gpio.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
 #include <asm/unaligned.h>
@@ -136,25 +135,6 @@ static const char ep0name [] = "ep0";
 static void pxa25x_ep_fifo_flush (struct usb_ep *ep);
 static void nuke (struct pxa25x_ep *, int status);
 
-/* one GPIO should control a D+ pullup, so host sees this device (or not) */
-static void pullup_off(void)
-{
-	struct pxa2xx_udc_mach_info		*mach = the_controller->mach;
-	int off_level = mach->gpio_pullup_inverted;
-
-	if (gpio_is_valid(mach->gpio_pullup))
-		gpio_set_value(mach->gpio_pullup, off_level);
-}
-
-static void pullup_on(void)
-{
-	struct pxa2xx_udc_mach_info		*mach = the_controller->mach;
-	int on_level = !mach->gpio_pullup_inverted;
-
-	if (gpio_is_valid(mach->gpio_pullup))
-		gpio_set_value(mach->gpio_pullup, on_level);
-}
-
 static void pio_irq_enable(int bEndpointAddress)
 {
         bEndpointAddress &= 0xf;
@@ -979,10 +959,6 @@ static int pxa25x_udc_pullup(struct usb_gadget *_gadget, int is_active)
 
 	udc = container_of(_gadget, struct pxa25x_udc, gadget);
 
-	/* not all boards support pullup control */
-	if (!gpio_is_valid(udc->mach->gpio_pullup))
-		return -EOPNOTSUPP;
-
 	udc->pullup = (is_active != 0);
 	pullup(udc);
 	return 0;
@@ -1160,9 +1136,6 @@ static void udc_disable(struct pxa25x_udc *dev)
 	UICR0 = UICR1 = 0xff;
 	UFNRH = UFNRH_SIM;
 
-	/* if hardware supports it, disconnect from usb */
-	pullup_off();
-
 	udc_clear_mask_UDCCR(UDCCR_UDE);
 
 	ep0_idle (dev);
@@ -1243,9 +1216,6 @@ static void udc_enable (struct pxa25x_udc *dev)
 
 	/* enable ep0 irqs */
 	UICR0 &= ~UICR0_IM0;
-
-	/* if hardware supports it, pullup D+ and wait for reset */
-	pullup_on();
 }
 
 
@@ -2126,17 +2096,6 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
 
 	dev->transceiver = otg_get_transceiver();
 
-	if (gpio_is_valid(dev->mach->gpio_pullup)) {
-		if ((retval = gpio_request(dev->mach->gpio_pullup,
-				"pca25x_udc GPIO PULLUP"))) {
-			dev_dbg(&pdev->dev,
-				"can't get pullup gpio %d, err: %d\n",
-				dev->mach->gpio_pullup, retval);
-			goto err_gpio_pullup;
-		}
-		gpio_direction_output(dev->mach->gpio_pullup, 0);
-	}
-
 	init_timer(&dev->timer);
 	dev->timer.function = udc_watchdog;
 	dev->timer.data = (unsigned long) dev;
@@ -2168,9 +2127,6 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
 	return 0;
 
  err_irq1:
-	if (gpio_is_valid(dev->mach->gpio_pullup))
-		gpio_free(dev->mach->gpio_pullup);
- err_gpio_pullup:
 	if (dev->transceiver) {
 		otg_put_transceiver(dev->transceiver);
 		dev->transceiver = NULL;
@@ -2180,11 +2136,6 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
 	return retval;
 }
 
-static void pxa25x_udc_shutdown(struct platform_device *_dev)
-{
-	pullup_off();
-}
-
 static int __exit pxa25x_udc_remove(struct platform_device *pdev)
 {
 	struct pxa25x_udc *dev = platform_get_drvdata(pdev);
@@ -2201,8 +2152,6 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
 		free_irq(platform_get_irq(pdev, 0), dev);
 		dev->got_irq = 0;
 	}
-	if (gpio_is_valid(dev->mach->gpio_pullup))
-		gpio_free(dev->mach->gpio_pullup);
 
 	clk_put(dev->clk);
 
@@ -2237,8 +2186,6 @@ static int pxa25x_udc_suspend(struct platform_device *dev, pm_message_t state)
 	struct pxa25x_udc	*udc = platform_get_drvdata(dev);
 	unsigned long flags;
 
-	if (!gpio_is_valid(udc->mach->gpio_pullup))
-		WARNING("USB host won't detect disconnect!\n");
 	udc->suspended = 1;
 
 	local_irq_save(flags);
@@ -2269,7 +2216,6 @@ static int pxa25x_udc_resume(struct platform_device *dev)
 /*-------------------------------------------------------------------------*/
 
 static struct platform_driver udc_driver = {
-	.shutdown	= pxa25x_udc_shutdown,
 	.remove		= __exit_p(pxa25x_udc_remove),
 	.suspend	= pxa25x_udc_suspend,
 	.resume		= pxa25x_udc_resume,
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 5760769..cdebfa9 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -30,7 +30,6 @@
 #include <linux/proc_fs.h>
 #include <linux/clk.h>
 #include <linux/irq.h>
-#include <linux/gpio.h>
 #include <linux/slab.h>
 #include <linux/prefetch.h>
 
@@ -1519,15 +1518,9 @@ static struct usb_ep_ops pxa_ep_ops = {
 static void dplus_pullup(struct pxa_udc *udc, int on)
 {
 	if (on) {
-		if (gpio_is_valid(udc->mach->gpio_pullup))
-			gpio_set_value(udc->mach->gpio_pullup,
-				       !udc->mach->gpio_pullup_inverted);
 		if (udc->mach->udc_command)
 			udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
 	} else {
-		if (gpio_is_valid(udc->mach->gpio_pullup))
-			gpio_set_value(udc->mach->gpio_pullup,
-				       udc->mach->gpio_pullup_inverted);
 		if (udc->mach->udc_command)
 			udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
 	}
@@ -1620,7 +1613,7 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
 {
 	struct pxa_udc *udc = to_gadget_udc(_gadget);
 
-	if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
+	if (!udc->mach->udc_command)
 		return -EOPNOTSUPP;
 
 	dplus_pullup(udc, is_active);
@@ -2459,7 +2452,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev)
 {
 	struct resource *regs;
 	struct pxa_udc *udc = &memory;
-	int retval = 0, gpio;
+	int retval = 0;
 
 	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!regs)
@@ -2472,19 +2465,6 @@ static int __init pxa_udc_probe(struct platform_device *pdev)
 	udc->mach = pdev->dev.platform_data;
 	udc->transceiver = otg_get_transceiver();
 
-	gpio = udc->mach->gpio_pullup;
-	if (gpio_is_valid(gpio)) {
-		retval = gpio_request(gpio, "USB D+ pullup");
-		if (retval == 0)
-			gpio_direction_output(gpio,
-				       udc->mach->gpio_pullup_inverted);
-	}
-	if (retval) {
-		dev_err(&pdev->dev, "Couldn't request gpio %d : %d\n",
-			gpio, retval);
-		return retval;
-	}
-
 	udc->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(udc->clk)) {
 		retval = PTR_ERR(udc->clk);
@@ -2535,13 +2515,10 @@ err_clk:
 static int __exit pxa_udc_remove(struct platform_device *_dev)
 {
 	struct pxa_udc *udc = platform_get_drvdata(_dev);
-	int gpio = udc->mach->gpio_pullup;
 
 	usb_gadget_unregister_driver(udc->driver);
 	free_irq(udc->irq, udc);
 	pxa_cleanup_debugfs(udc);
-	if (gpio_is_valid(gpio))
-		gpio_free(gpio);
 
 	otg_put_transceiver(udc->transceiver);
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 00/15] Big pxa2[57]x_udc cleanup
  2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
                   ` (14 preceding siblings ...)
  2011-07-05 13:08 ` [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling Dmitry Eremin-Solenikov
@ 2011-07-05 13:45 ` Eric Miao
  15 siblings, 0 replies; 37+ messages in thread
From: Eric Miao @ 2011-07-05 13:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 5, 2011 at 9:08 PM, Dmitry Eremin-Solenikov
<dbaryshkov@gmail.com> wrote:
> Hello colleagues,
>
> Please review the following patch serie. It's major task is removal of code
> and functionality duplication between pxa2[57]x_udc drivers and OTG
> transceivers subsystem.
>
> The following changes since commit fe0d42203cb5616eeff68b14576a0f7e2dd56625:
>
> ?Linux 3.0-rc6 (2011-07-04 15:56:24 -0700)
>
> are available in the git repository at:
> ?git://git.kernel.org/pub/scm/linux/kernel/git/lumag/tosa-2.6.git misc/pxa-udc-cleanup
>
> Dmitry Eremin-Solenikov (15):
> ? ? ?ARM: pxa/balloon3: drop udc_is_connected
> ? ? ?ARM: pxa/mioa701: drop udc_is_connected
> ? ? ?ARM: pxa/stargate2: drop udc_is_connected
> ? ? ?ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver
> ? ? ?ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver
> ? ? ?pxa: drop handling of udc_is_connected
> ? ? ?pxa25x_udc: drop support for udc_command
> ? ? ?otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing
> ? ? ?corgi: convert to use gpio-pullup
> ? ? ?poodle: convert to use gpio-pullup
> ? ? ?h5000: convert to use gpio-pullup
> ? ? ?gpio-vbus: support disabling D+ pullup on suspend
> ? ? ?mioa701: move gpio-pullup functionality to gpio-vbus
> ? ? ?gpio-pullup: support disabling D+ pullup on suspend
> ? ? ?pxa2[57]x_udc: drop gpio_pullup handling
>
> ?arch/arm/include/asm/mach/udc_pxa2xx.h | ? ?9 --
> ?arch/arm/mach-pxa/balloon3.c ? ? ? ? ? | ? ?7 -
> ?arch/arm/mach-pxa/colibri-pxa320.c ? ? | ? ?1 -
> ?arch/arm/mach-pxa/corgi.c ? ? ? ? ? ? ?| ? 14 ++-
> ?arch/arm/mach-pxa/devices.c ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-pxa/h5000.c ? ? ? ? ? ? ?| ? 14 ++-
> ?arch/arm/mach-pxa/lubbock.c ? ? ? ? ? ?| ? 17 +--
> ?arch/arm/mach-pxa/mioa701.c ? ? ? ? ? ?| ? 19 +--
> ?arch/arm/mach-pxa/poodle.c ? ? ? ? ? ? | ? 13 ++-
> ?arch/arm/mach-pxa/stargate2.c ? ? ? ? ?| ? ?6 -
> ?arch/arm/mach-pxa/vpac270.c ? ? ? ? ? ?| ? ?1 -
> ?drivers/usb/gadget/pxa25x_udc.c ? ? ? ?| ?132 ---------------------
> ?drivers/usb/gadget/pxa27x_udc.c ? ? ? ?| ? 27 +----
> ?drivers/usb/otg/Kconfig ? ? ? ? ? ? ? ?| ? 18 +++
> ?drivers/usb/otg/Makefile ? ? ? ? ? ? ? | ? ?2 +
> ?drivers/usb/otg/gpio_pullup.c ? ? ? ? ?| ?204 ++++++++++++++++++++++++++++++++
> ?drivers/usb/otg/gpio_vbus.c ? ? ? ? ? ?| ? 42 +++++++
> ?drivers/usb/otg/lubbock-usb.c ? ? ? ? ?| ?178 ++++++++++++++++++++++++++++
> ?include/linux/usb/gpio_vbus.h ? ? ? ? ?| ? ?1 +
> ?19 files changed, 493 insertions(+), 214 deletions(-)
> ?create mode 100644 drivers/usb/otg/gpio_pullup.c
> ?create mode 100644 drivers/usb/otg/lubbock-usb.c
>

Hi Dmitry,

The series looks good to me. It can be better re-ordered so that changes
to drivers/usb are the first part, and changes to arch/arm later?

Dropping the udc_is_connected() in each board file, I don't mind they
are in a same patch or separated.

Greg & Felipe,

Can you help merge the patches through the USB tree? Or if you can
give your Acks here. Thanks.

- eric

>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-05 13:08 ` [PATCH 07/15] pxa25x_udc: drop support for udc_command Dmitry Eremin-Solenikov
@ 2011-07-05 13:46   ` Felipe Balbi
  2011-07-08 21:34     ` Greg KH
  0 siblings, 1 reply; 37+ messages in thread
From: Felipe Balbi @ 2011-07-05 13:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov wrote:
> None of pxa25x devices use udc_command() for UDC functionality.
> Stop calling this callback from pxa25x_udc code.

looks good to me, Greg since this is a big re-work which depends on
parts out of the Gadget Framework, can you take all the patches
straight ? Here's my Acked-by:

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110705/4b6e3c94/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver
  2011-07-05 13:08 ` [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver Dmitry Eremin-Solenikov
@ 2011-07-05 13:47   ` Felipe Balbi
  0 siblings, 0 replies; 37+ messages in thread
From: Felipe Balbi @ 2011-07-05 13:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jul 05, 2011 at 05:08:30PM +0400, Dmitry Eremin-Solenikov wrote:
> Move all handling of lubbock board to separate lubbock-usb transceiver,
> removing cruft from pxa25x_udc.
> 
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110705/519756fd/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-05 13:08 ` [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling Dmitry Eremin-Solenikov
@ 2011-07-05 13:49   ` Felipe Balbi
  2011-07-05 20:42   ` Robert Jarzmik
  1 sibling, 0 replies; 37+ messages in thread
From: Felipe Balbi @ 2011-07-05 13:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 05, 2011 at 05:08:41PM +0400, Dmitry Eremin-Solenikov wrote:
> Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
> handling from pxa UDC drivers, thus simplifying them a bit.
> 
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

for drivers/usb/gadget:

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110705/e06a378e/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver
  2011-07-05 13:08 ` [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver Dmitry Eremin-Solenikov
@ 2011-07-05 14:47   ` Sergei Shtylyov
  0 siblings, 0 replies; 37+ messages in thread
From: Sergei Shtylyov @ 2011-07-05 14:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

Dmitry Eremin-Solenikov wrote:

> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

    One signoff was enough. :-)

WBR, Sergei

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-05 13:08 ` [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling Dmitry Eremin-Solenikov
  2011-07-05 13:49   ` Felipe Balbi
@ 2011-07-05 20:42   ` Robert Jarzmik
  2011-07-05 20:58     ` Dmitry Eremin-Solenikov
  1 sibling, 1 reply; 37+ messages in thread
From: Robert Jarzmik @ 2011-07-05 20:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/05/2011 03:08 PM, Dmitry Eremin-Solenikov wrote:
> Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
> handling from pxa UDC drivers, thus simplifying them a bit.

Is this patch compliant with USB 2 specification regarding maximum time 
between pullup triggering and UDC ready to answer the "RESET" packet and 
be assigned an address ?

This is the sequence I'm worried about :
  (1) The gpio-vbus is loaded
  (2) The pxa27x_udc is loaded
  (3) USB cable is plugged
      => VBUS is sensed
  (4) gpio-vbus pulls up the D+ (Dmitry, is that right ?)
  (5) the host waits for UDC to settle (100 ms ?)
  (5) set address packet(s) are sent from host to UDC
  (6) UDC is not enabled, as no gadget is registered
      => UDC doesn't answer
      => usb host cannot assign it an address
  (7) a gadget is loaded (g_ether for example)
      => UDC is enabled, but too late

Alan, Gregh, could you confirm point (5) about a maximum time between D+ 
line activation and UDC duty to repond to "set address" packets, as well 
as the consequence of point (6) where the usb device is rejected because 
no address could be assigned ?

Dmitry, could you confirm the the D+ pullup is done at point (4) ?

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-05 20:42   ` Robert Jarzmik
@ 2011-07-05 20:58     ` Dmitry Eremin-Solenikov
  2011-07-06  7:20       ` Felipe Balbi
  0 siblings, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-05 20:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/6/11, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> On 07/05/2011 03:08 PM, Dmitry Eremin-Solenikov wrote:
>> Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
>> handling from pxa UDC drivers, thus simplifying them a bit.
>
> Is this patch compliant with USB 2 specification regarding maximum time
> between pullup triggering and UDC ready to answer the "RESET" packet and
> be assigned an address ?
>
> This is the sequence I'm worried about :
>   (1) The gpio-vbus is loaded
>   (2) The pxa27x_udc is loaded
>   (3) USB cable is plugged
>       => VBUS is sensed
>   (4) gpio-vbus pulls up the D+ (Dmitry, is that right ?)
>   (5) the host waits for UDC to settle (100 ms ?)
>   (5) set address packet(s) are sent from host to UDC
>   (6) UDC is not enabled, as no gadget is registered
>       => UDC doesn't answer
>       => usb host cannot assign it an address
>   (7) a gadget is loaded (g_ether for example)
>       => UDC is enabled, but too late
>
> Alan, Gregh, could you confirm point (5) about a maximum time between D+
> line activation and UDC duty to repond to "set address" packets, as well
> as the consequence of point (6) where the usb device is rejected because
> no address could be assigned ?
>
> Dmitry, could you confirm the the D+ pullup is done at point (4) ?

No, I can't confirm this. IIUC, evrything happens in abit different way:
(4) trancseiver notifies udc about VBUS sense
(5) a gadget is loaded (g_ether for example)
(6) gadget asks udc to enale  pullup
(7) udc tells gpio_vbus to enable pullup.

etc...

>
> Cheers.
>
> --
> Robert
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-05 20:58     ` Dmitry Eremin-Solenikov
@ 2011-07-06  7:20       ` Felipe Balbi
  2011-07-06  7:30         ` Dmitry Eremin-Solenikov
  0 siblings, 1 reply; 37+ messages in thread
From: Felipe Balbi @ 2011-07-06  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

hi,

On Wed, Jul 06, 2011 at 12:58:48AM +0400, Dmitry Eremin-Solenikov wrote:
> On 7/6/11, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > On 07/05/2011 03:08 PM, Dmitry Eremin-Solenikov wrote:
> >> Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
> >> handling from pxa UDC drivers, thus simplifying them a bit.
> >
> > Is this patch compliant with USB 2 specification regarding maximum time
> > between pullup triggering and UDC ready to answer the "RESET" packet and
> > be assigned an address ?
> >
> > This is the sequence I'm worried about :
> >   (1) The gpio-vbus is loaded
> >   (2) The pxa27x_udc is loaded
> >   (3) USB cable is plugged
> >       => VBUS is sensed
> >   (4) gpio-vbus pulls up the D+ (Dmitry, is that right ?)
> >   (5) the host waits for UDC to settle (100 ms ?)
> >   (5) set address packet(s) are sent from host to UDC
> >   (6) UDC is not enabled, as no gadget is registered
> >       => UDC doesn't answer
> >       => usb host cannot assign it an address
> >   (7) a gadget is loaded (g_ether for example)
> >       => UDC is enabled, but too late
> >
> > Alan, Gregh, could you confirm point (5) about a maximum time between D+
> > line activation and UDC duty to repond to "set address" packets, as well
> > as the consequence of point (6) where the usb device is rejected because
> > no address could be assigned ?
> >
> > Dmitry, could you confirm the the D+ pullup is done at point (4) ?
> 
> No, I can't confirm this. IIUC, evrything happens in abit different way:
> (4) trancseiver notifies udc about VBUS sense
> (5) a gadget is loaded (g_ether for example)
> (6) gadget asks udc to enale  pullup
> (7) udc tells gpio_vbus to enable pullup.

yeah, with udc-core.c we only enable pullup after gadget driver is
loaded.

290                 ret = bind(udc->gadget);
291                 if (ret)
292                         goto err1;
293                 ret = usb_gadget_udc_start(udc->gadget, driver);
294                 if (ret) {
295                         driver->unbind(udc->gadget);
296                         goto err1;
297                 }
298                 usb_gadget_connect(udc->gadget);

but this is the new style bind() and many UDCs still need to be
converted.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110706/eb2b3213/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-06  7:20       ` Felipe Balbi
@ 2011-07-06  7:30         ` Dmitry Eremin-Solenikov
  2011-07-06  7:34           ` Felipe Balbi
  0 siblings, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-06  7:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 06.07.2011 11:20, Felipe Balbi wrote:
> hi,
>
> On Wed, Jul 06, 2011 at 12:58:48AM +0400, Dmitry Eremin-Solenikov wrote:
>> On 7/6/11, Robert Jarzmik<robert.jarzmik@free.fr>  wrote:
>>> On 07/05/2011 03:08 PM, Dmitry Eremin-Solenikov wrote:
>>>> Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
>>>> handling from pxa UDC drivers, thus simplifying them a bit.
>>>
>>> Is this patch compliant with USB 2 specification regarding maximum time
>>> between pullup triggering and UDC ready to answer the "RESET" packet and
>>> be assigned an address ?
>>>
>>> This is the sequence I'm worried about :
>>>    (1) The gpio-vbus is loaded
>>>    (2) The pxa27x_udc is loaded
>>>    (3) USB cable is plugged
>>>        =>  VBUS is sensed
>>>    (4) gpio-vbus pulls up the D+ (Dmitry, is that right ?)
>>>    (5) the host waits for UDC to settle (100 ms ?)
>>>    (5) set address packet(s) are sent from host to UDC
>>>    (6) UDC is not enabled, as no gadget is registered
>>>        =>  UDC doesn't answer
>>>        =>  usb host cannot assign it an address
>>>    (7) a gadget is loaded (g_ether for example)
>>>        =>  UDC is enabled, but too late
>>>
>>> Alan, Gregh, could you confirm point (5) about a maximum time between D+
>>> line activation and UDC duty to repond to "set address" packets, as well
>>> as the consequence of point (6) where the usb device is rejected because
>>> no address could be assigned ?
>>>
>>> Dmitry, could you confirm the the D+ pullup is done at point (4) ?
>>
>> No, I can't confirm this. IIUC, evrything happens in abit different way:
>> (4) trancseiver notifies udc about VBUS sense
>> (5) a gadget is loaded (g_ether for example)
>> (6) gadget asks udc to enale  pullup
>> (7) udc tells gpio_vbus to enable pullup.
>
> yeah, with udc-core.c we only enable pullup after gadget driver is
> loaded.
>
> 290                 ret = bind(udc->gadget);
> 291                 if (ret)
> 292                         goto err1;
> 293                 ret = usb_gadget_udc_start(udc->gadget, driver);
> 294                 if (ret) {
> 295                         driver->unbind(udc->gadget);
> 296                         goto err1;
> 297                 }
> 298                 usb_gadget_connect(udc->gadget);
>
> but this is the new style bind() and many UDCs still need to be
> converted.

This was working before the udc-core. If it doesn't work now for 
unconverted drivers (PXA e.g.) that's really a huge regression!

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling
  2011-07-06  7:30         ` Dmitry Eremin-Solenikov
@ 2011-07-06  7:34           ` Felipe Balbi
  0 siblings, 0 replies; 37+ messages in thread
From: Felipe Balbi @ 2011-07-06  7:34 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Wed, Jul 06, 2011 at 11:30:52AM +0400, Dmitry Eremin-Solenikov wrote:
> On 06.07.2011 11:20, Felipe Balbi wrote:
> >hi,
> >
> >On Wed, Jul 06, 2011 at 12:58:48AM +0400, Dmitry Eremin-Solenikov wrote:
> >>On 7/6/11, Robert Jarzmik<robert.jarzmik@free.fr>  wrote:
> >>>On 07/05/2011 03:08 PM, Dmitry Eremin-Solenikov wrote:
> >>>>Now as all drivers were converted to using gpio-vbus, drop gpio-pullup
> >>>>handling from pxa UDC drivers, thus simplifying them a bit.
> >>>
> >>>Is this patch compliant with USB 2 specification regarding maximum time
> >>>between pullup triggering and UDC ready to answer the "RESET" packet and
> >>>be assigned an address ?
> >>>
> >>>This is the sequence I'm worried about :
> >>>   (1) The gpio-vbus is loaded
> >>>   (2) The pxa27x_udc is loaded
> >>>   (3) USB cable is plugged
> >>>       =>  VBUS is sensed
> >>>   (4) gpio-vbus pulls up the D+ (Dmitry, is that right ?)
> >>>   (5) the host waits for UDC to settle (100 ms ?)
> >>>   (5) set address packet(s) are sent from host to UDC
> >>>   (6) UDC is not enabled, as no gadget is registered
> >>>       =>  UDC doesn't answer
> >>>       =>  usb host cannot assign it an address
> >>>   (7) a gadget is loaded (g_ether for example)
> >>>       =>  UDC is enabled, but too late
> >>>
> >>>Alan, Gregh, could you confirm point (5) about a maximum time between D+
> >>>line activation and UDC duty to repond to "set address" packets, as well
> >>>as the consequence of point (6) where the usb device is rejected because
> >>>no address could be assigned ?
> >>>
> >>>Dmitry, could you confirm the the D+ pullup is done at point (4) ?
> >>
> >>No, I can't confirm this. IIUC, evrything happens in abit different way:
> >>(4) trancseiver notifies udc about VBUS sense
> >>(5) a gadget is loaded (g_ether for example)
> >>(6) gadget asks udc to enale  pullup
> >>(7) udc tells gpio_vbus to enable pullup.
> >
> >yeah, with udc-core.c we only enable pullup after gadget driver is
> >loaded.
> >
> >290                 ret = bind(udc->gadget);
> >291                 if (ret)
> >292                         goto err1;
> >293                 ret = usb_gadget_udc_start(udc->gadget, driver);
> >294                 if (ret) {
> >295                         driver->unbind(udc->gadget);
> >296                         goto err1;
> >297                 }
> >298                 usb_gadget_connect(udc->gadget);
> >
> >but this is the new style bind() and many UDCs still need to be
> >converted.
> 
> This was working before the udc-core. If it doesn't work now for
> unconverted drivers (PXA e.g.) that's really a huge regression!

the difference is that before every UDC had to implement that by itself
and now we're moving the common parts to a generic layer. If your UDC
already implemented it this way when exporting
usb_gadget_probe_driver(), then no changes for you, but I guarantee
there where UDCs which didn't mind being careful with data pullups and
would connect even though a gadget driver was nowhere to be seen ;-)

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110706/a135c906/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-05 13:46   ` Felipe Balbi
@ 2011-07-08 21:34     ` Greg KH
  2011-07-08 21:54       ` Felipe Balbi
  2011-07-09  8:50       ` Dmitry Eremin-Solenikov
  0 siblings, 2 replies; 37+ messages in thread
From: Greg KH @ 2011-07-08 21:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
> Hi,
> 
> On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov wrote:
> > None of pxa25x devices use udc_command() for UDC functionality.
> > Stop calling this callback from pxa25x_udc code.
> 
> looks good to me, Greg since this is a big re-work which depends on
> parts out of the Gadget Framework, can you take all the patches
> straight ? Here's my Acked-by:
> 
> Acked-by: Felipe Balbi <balbi@ti.com>

I can't take these, they should go through the gpio subsystem maintainer
instead.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-08 21:34     ` Greg KH
@ 2011-07-08 21:54       ` Felipe Balbi
  2011-07-08 22:02         ` Greg KH
  2011-07-09  8:50       ` Dmitry Eremin-Solenikov
  1 sibling, 1 reply; 37+ messages in thread
From: Felipe Balbi @ 2011-07-08 21:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 08, 2011 at 02:34:28PM -0700, Greg KH wrote:
> On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
> > Hi,
> > 
> > On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov wrote:
> > > None of pxa25x devices use udc_command() for UDC functionality.
> > > Stop calling this callback from pxa25x_udc code.
> > 
> > looks good to me, Greg since this is a big re-work which depends on
> > parts out of the Gadget Framework, can you take all the patches
> > straight ? Here's my Acked-by:
> > 
> > Acked-by: Felipe Balbi <balbi@ti.com>
> 
> I can't take these, they should go through the gpio subsystem maintainer
> instead.

But why ? They only touch drivers/usb/gadget/pxa*.c

Would it be enough if Grant would Ack them ?

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110709/c10b73d3/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-08 21:54       ` Felipe Balbi
@ 2011-07-08 22:02         ` Greg KH
  2011-07-08 22:14           ` Felipe Balbi
  2011-07-12 13:41           ` Dmitry Eremin-Solenikov
  0 siblings, 2 replies; 37+ messages in thread
From: Greg KH @ 2011-07-08 22:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jul 09, 2011 at 12:54:43AM +0300, Felipe Balbi wrote:
> On Fri, Jul 08, 2011 at 02:34:28PM -0700, Greg KH wrote:
> > On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
> > > Hi,
> > > 
> > > On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov wrote:
> > > > None of pxa25x devices use udc_command() for UDC functionality.
> > > > Stop calling this callback from pxa25x_udc code.
> > > 
> > > looks good to me, Greg since this is a big re-work which depends on
> > > parts out of the Gadget Framework, can you take all the patches
> > > straight ? Here's my Acked-by:
> > > 
> > > Acked-by: Felipe Balbi <balbi@ti.com>
> > 
> > I can't take these, they should go through the gpio subsystem maintainer
> > instead.
> 
> But why ? They only touch drivers/usb/gadget/pxa*.c

All 15 patches?  No they don't they touch all sorts of things.

> Would it be enough if Grant would Ack them ?

Sure, but it would be easier if Grant took them all, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-08 22:02         ` Greg KH
@ 2011-07-08 22:14           ` Felipe Balbi
  2011-07-12 13:41           ` Dmitry Eremin-Solenikov
  1 sibling, 0 replies; 37+ messages in thread
From: Felipe Balbi @ 2011-07-08 22:14 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Jul 08, 2011 at 03:02:58PM -0700, Greg KH wrote:
> > > I can't take these, they should go through the gpio subsystem maintainer
> > > instead.
> > 
> > But why ? They only touch drivers/usb/gadget/pxa*.c
> 
> All 15 patches?  No they don't they touch all sorts of things.
> 
> > Would it be enough if Grant would Ack them ?
> 
> Sure, but it would be easier if Grant took them all, right?

Makes sense too.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110709/ade92949/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-08 21:34     ` Greg KH
  2011-07-08 21:54       ` Felipe Balbi
@ 2011-07-09  8:50       ` Dmitry Eremin-Solenikov
  1 sibling, 0 replies; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-09  8:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 7/9/11, Greg KH <greg@kroah.com> wrote:
> On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
>> Hi,
>>
>> On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov wrote:
>> > None of pxa25x devices use udc_command() for UDC functionality.
>> > Stop calling this callback from pxa25x_udc code.
>>
>> looks good to me, Greg since this is a big re-work which depends on
>> parts out of the Gadget Framework, can you take all the patches
>> straight ? Here's my Acked-by:
>>
>> Acked-by: Felipe Balbi <balbi@ti.com>
>
> I can't take these, they should go through the gpio subsystem maintainer
> instead.

Why? I can understand if you'd say that it should go through the ARM/PXA
trees, but why GPIO?

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-08 22:02         ` Greg KH
  2011-07-08 22:14           ` Felipe Balbi
@ 2011-07-12 13:41           ` Dmitry Eremin-Solenikov
  2011-07-14  2:52             ` Eric Miao
  1 sibling, 1 reply; 37+ messages in thread
From: Dmitry Eremin-Solenikov @ 2011-07-12 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

On 7/9/11, Greg KH <gregkh@suse.de> wrote:
> On Sat, Jul 09, 2011 at 12:54:43AM +0300, Felipe Balbi wrote:
>> On Fri, Jul 08, 2011 at 02:34:28PM -0700, Greg KH wrote:
>> > On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
>> > > Hi,
>> > >
>> > > On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov
>> > > wrote:
>> > > > None of pxa25x devices use udc_command() for UDC functionality.
>> > > > Stop calling this callback from pxa25x_udc code.
>> > >
>> > > looks good to me, Greg since this is a big re-work which depends on
>> > > parts out of the Gadget Framework, can you take all the patches
>> > > straight ? Here's my Acked-by:
>> > >
>> > > Acked-by: Felipe Balbi <balbi@ti.com>
>> >
>> > I can't take these, they should go through the gpio subsystem maintainer
>> > instead.
>>
>> But why ? They only touch drivers/usb/gadget/pxa*.c
>
> All 15 patches?  No they don't they touch all sorts of things.
>
>> Would it be enough if Grant would Ack them ?
>
> Sure, but it would be easier if Grant took them all, right?

Colleagues, can you please tell me the current status/future of this patches?
Are they going to 3.1? 3.2? Should they go via ARM/PXA, via usb? usb-gadget?
Via gpio(why?)?? Should I send them to somebody for merging?

Thank you!

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-12 13:41           ` Dmitry Eremin-Solenikov
@ 2011-07-14  2:52             ` Eric Miao
  2011-07-14 18:24               ` Robert Jarzmik
  2011-07-18  8:38               ` Felipe Balbi
  0 siblings, 2 replies; 37+ messages in thread
From: Eric Miao @ 2011-07-14  2:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 12, 2011 at 9:41 PM, Dmitry Eremin-Solenikov
<dbaryshkov@gmail.com> wrote:
> On 7/9/11, Greg KH <gregkh@suse.de> wrote:
>> On Sat, Jul 09, 2011 at 12:54:43AM +0300, Felipe Balbi wrote:
>>> On Fri, Jul 08, 2011 at 02:34:28PM -0700, Greg KH wrote:
>>> > On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
>>> > > Hi,
>>> > >
>>> > > On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov
>>> > > wrote:
>>> > > > None of pxa25x devices use udc_command() for UDC functionality.
>>> > > > Stop calling this callback from pxa25x_udc code.
>>> > >
>>> > > looks good to me, Greg since this is a big re-work which depends on
>>> > > parts out of the Gadget Framework, can you take all the patches
>>> > > straight ? Here's my Acked-by:
>>> > >
>>> > > Acked-by: Felipe Balbi <balbi@ti.com>
>>> >
>>> > I can't take these, they should go through the gpio subsystem maintainer
>>> > instead.
>>>
>>> But why ? They only touch drivers/usb/gadget/pxa*.c
>>
>> All 15 patches? ?No they don't they touch all sorts of things.
>>
>>> Would it be enough if Grant would Ack them ?
>>
>> Sure, but it would be easier if Grant took them all, right?
>
> Colleagues, can you please tell me the current status/future of this patches?
> Are they going to 3.1? 3.2? Should they go via ARM/PXA, via usb? usb-gadget?
> Via gpio(why?)?? Should I send them to somebody for merging?

Well, I agree with Dmitry the whole patchset is not related to the GPIO
subsystem at all. The major cleanup is actually to the PXA machines,
and touches part of the pxa25x_udc driver. If some one Acks the USB
part, I can help take the remaining patches.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-14  2:52             ` Eric Miao
@ 2011-07-14 18:24               ` Robert Jarzmik
  2011-07-14 19:01                 ` Robert Jarzmik
  2011-07-15 10:40                 ` Eric Miao
  2011-07-18  8:38               ` Felipe Balbi
  1 sibling, 2 replies; 37+ messages in thread
From: Robert Jarzmik @ 2011-07-14 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/14/2011 04:52 AM, Eric Miao wrote:
> Well, I agree with Dmitry the whole patchset is not related to the GPIO
> subsystem at all. The major cleanup is actually to the PXA machines,
> and touches part of the pxa25x_udc driver. If some one Acks the USB
> part, I can help take the remaining patches.

Ok, I tested the patches for the pxa27x_udc and mioa701 parts.
Therefore, as it is working, for patches 2, 13, and 15 (reduced to 
pxa27x_udc), I give my :
Acked-by: Robert Jarzmik <robert.jarzmik@free>

That leaves you with the pxa25x_udc, I'm afraid, but I don't maintain 
that one. Is there an identified maintainer now, or at least someone 
able to test it ?

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-14 18:24               ` Robert Jarzmik
@ 2011-07-14 19:01                 ` Robert Jarzmik
  2011-07-15 10:40                 ` Eric Miao
  1 sibling, 0 replies; 37+ messages in thread
From: Robert Jarzmik @ 2011-07-14 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/14/2011 08:24 PM, Robert Jarzmik wrote:
> On 07/14/2011 04:52 AM, Eric Miao wrote:
>> Well, I agree with Dmitry the whole patchset is not related to the GPIO
>> subsystem at all. The major cleanup is actually to the PXA machines,
>> and touches part of the pxa25x_udc driver. If some one Acks the USB
>> part, I can help take the remaining patches.
>
And I forgot patch 12 :
Acked-by: Robert Jarzmik <robert.jarzmik@free>

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-14 18:24               ` Robert Jarzmik
  2011-07-14 19:01                 ` Robert Jarzmik
@ 2011-07-15 10:40                 ` Eric Miao
  1 sibling, 0 replies; 37+ messages in thread
From: Eric Miao @ 2011-07-15 10:40 UTC (permalink / raw)
  To: linux-arm-kernel

Not sure if zaurus people can help test it. Pavel?

- eric

On Fri, Jul 15, 2011 at 2:24 AM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> On 07/14/2011 04:52 AM, Eric Miao wrote:
>>
>> Well, I agree with Dmitry the whole patchset is not related to the GPIO
>> subsystem at all. The major cleanup is actually to the PXA machines,
>> and touches part of the pxa25x_udc driver. If some one Acks the USB
>> part, I can help take the remaining patches.
>
> Ok, I tested the patches for the pxa27x_udc and mioa701 parts.
> Therefore, as it is working, for patches 2, 13, and 15 (reduced to
> pxa27x_udc), I give my :
> Acked-by: Robert Jarzmik <robert.jarzmik@free>
>
> That leaves you with the pxa25x_udc, I'm afraid, but I don't maintain that
> one. Is there an identified maintainer now, or at least someone able to test
> it ?
>
> Cheers.
>
> --
> Robert
>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 07/15] pxa25x_udc: drop support for udc_command
  2011-07-14  2:52             ` Eric Miao
  2011-07-14 18:24               ` Robert Jarzmik
@ 2011-07-18  8:38               ` Felipe Balbi
  1 sibling, 0 replies; 37+ messages in thread
From: Felipe Balbi @ 2011-07-18  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Jul 14, 2011 at 10:52:47AM +0800, Eric Miao wrote:
> On Tue, Jul 12, 2011 at 9:41 PM, Dmitry Eremin-Solenikov
> <dbaryshkov@gmail.com> wrote:
> > On 7/9/11, Greg KH <gregkh@suse.de> wrote:
> >> On Sat, Jul 09, 2011 at 12:54:43AM +0300, Felipe Balbi wrote:
> >>> On Fri, Jul 08, 2011 at 02:34:28PM -0700, Greg KH wrote:
> >>> > On Tue, Jul 05, 2011 at 04:46:16PM +0300, Felipe Balbi wrote:
> >>> > > Hi,
> >>> > >
> >>> > > On Tue, Jul 05, 2011 at 05:08:33PM +0400, Dmitry Eremin-Solenikov
> >>> > > wrote:
> >>> > > > None of pxa25x devices use udc_command() for UDC functionality.
> >>> > > > Stop calling this callback from pxa25x_udc code.
> >>> > >
> >>> > > looks good to me, Greg since this is a big re-work which depends on
> >>> > > parts out of the Gadget Framework, can you take all the patches
> >>> > > straight ? Here's my Acked-by:
> >>> > >
> >>> > > Acked-by: Felipe Balbi <balbi@ti.com>
> >>> >
> >>> > I can't take these, they should go through the gpio subsystem maintainer
> >>> > instead.
> >>>
> >>> But why ? They only touch drivers/usb/gadget/pxa*.c
> >>
> >> All 15 patches? ?No they don't they touch all sorts of things.
> >>
> >>> Would it be enough if Grant would Ack them ?
> >>
> >> Sure, but it would be easier if Grant took them all, right?
> >
> > Colleagues, can you please tell me the current status/future of this patches?
> > Are they going to 3.1? 3.2? Should they go via ARM/PXA, via usb? usb-gadget?
> > Via gpio(why?)?? Should I send them to somebody for merging?
> 
> Well, I agree with Dmitry the whole patchset is not related to the GPIO
> subsystem at all. The major cleanup is actually to the PXA machines,
> and touches part of the pxa25x_udc driver. If some one Acks the USB
> part, I can help take the remaining patches.

For the gadget part you can have my Ack. Although I don't have how to
test those patches, they seem simple enough:

Acked-by: Felipe Balbi <balbi@ti.com>

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110718/9c8c4546/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2011-07-18  8:38 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-05 13:08 [PATCH 00/15] Big pxa2[57]x_udc cleanup Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 01/15] ARM: pxa/balloon3: drop udc_is_connected Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 02/15] ARM: pxa/mioa701: " Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 03/15] ARM: pxa/stargate2: " Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 04/15] ARM: pxa25x_udc: separate lubbock handling to lubbock-usb transceiver Dmitry Eremin-Solenikov
2011-07-05 13:47   ` Felipe Balbi
2011-07-05 13:08 ` [PATCH 05/15] ARM: pxa/lubbock: switch to using lubbock_usb_xceiv transceiver Dmitry Eremin-Solenikov
2011-07-05 14:47   ` Sergei Shtylyov
2011-07-05 13:08 ` [PATCH 06/15] pxa: drop handling of udc_is_connected Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 07/15] pxa25x_udc: drop support for udc_command Dmitry Eremin-Solenikov
2011-07-05 13:46   ` Felipe Balbi
2011-07-08 21:34     ` Greg KH
2011-07-08 21:54       ` Felipe Balbi
2011-07-08 22:02         ` Greg KH
2011-07-08 22:14           ` Felipe Balbi
2011-07-12 13:41           ` Dmitry Eremin-Solenikov
2011-07-14  2:52             ` Eric Miao
2011-07-14 18:24               ` Robert Jarzmik
2011-07-14 19:01                 ` Robert Jarzmik
2011-07-15 10:40                 ` Eric Miao
2011-07-18  8:38               ` Felipe Balbi
2011-07-09  8:50       ` Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 08/15] otg: add gpio_pullup OTG transceiver for devices with no VBUS sensing Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 09/15] corgi: convert to use gpio-pullup Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 10/15] poodle: " Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 11/15] h5000: " Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 12/15] gpio-vbus: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 13/15] mioa701: move gpio-pullup functionality to gpio-vbus Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 14/15] gpio-pullup: support disabling D+ pullup on suspend Dmitry Eremin-Solenikov
2011-07-05 13:08 ` [PATCH 15/15] pxa2[57]x_udc: drop gpio_pullup handling Dmitry Eremin-Solenikov
2011-07-05 13:49   ` Felipe Balbi
2011-07-05 20:42   ` Robert Jarzmik
2011-07-05 20:58     ` Dmitry Eremin-Solenikov
2011-07-06  7:20       ` Felipe Balbi
2011-07-06  7:30         ` Dmitry Eremin-Solenikov
2011-07-06  7:34           ` Felipe Balbi
2011-07-05 13:45 ` [PATCH 00/15] Big pxa2[57]x_udc cleanup Eric Miao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.