All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] usb: musb/otg: cleanup and fixes
@ 2013-03-13  8:47 ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

This series has some misc cleanup and fixes. The fix solves the cold
plug issue in omap3 which some have reported. Developed these patches on
Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
(Grazvydas Ignotas patch series)

Tested for g_zero enumeration in pandaboard and beagleboard in both
cold plug and hot plug case. Any kind of testing for this series is welcome.

Kishon Vijay Abraham I (5):
  usb: musb: omap: remove the check before calling otg_set_vbus
  usb: musb: omap: always glue have the correct vbus/id status
  usb: otg: twl4030: use devres API for regulator get and request irq
  usb: musb: omap: add usb_phy_init in omap2430_musb_init
  usb: otg: twl4030: fix cold plug on OMAP3

 drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
 drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
 2 files changed, 22 insertions(+), 35 deletions(-)

-- 
1.7.10.4


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

* [PATCH 0/5] usb: musb/otg: cleanup and fixes
@ 2013-03-13  8:47 ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

This series has some misc cleanup and fixes. The fix solves the cold
plug issue in omap3 which some have reported. Developed these patches on
Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
(Grazvydas Ignotas patch series)

Tested for g_zero enumeration in pandaboard and beagleboard in both
cold plug and hot plug case. Any kind of testing for this series is welcome.

Kishon Vijay Abraham I (5):
  usb: musb: omap: remove the check before calling otg_set_vbus
  usb: musb: omap: always glue have the correct vbus/id status
  usb: otg: twl4030: use devres API for regulator get and request irq
  usb: musb: omap: add usb_phy_init in omap2430_musb_init
  usb: otg: twl4030: fix cold plug on OMAP3

 drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
 drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
 2 files changed, 22 insertions(+), 35 deletions(-)

-- 
1.7.10.4

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

* [PATCH 1/5] usb: musb: omap: remove the check before calling otg_set_vbus
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  -1 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

No functional change. otg_set_vbus is already protected so removed the
check before calling otg_set_vbus.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 558c1d6..78bfc50 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -174,8 +174,7 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
 				}
 			}
 
-			if (otg->set_vbus)
-				otg_set_vbus(otg, 1);
+			otg_set_vbus(otg, 1);
 		} else {
 			musb->is_active = 1;
 			otg->default_a = 1;
@@ -293,10 +292,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
 		}
 
 		omap2430_musb_set_vbus(musb, 0);
-		if (data->interface_type == MUSB_INTERFACE_UTMI) {
-			if (musb->xceiv->otg->set_vbus)
-				otg_set_vbus(musb->xceiv->otg, 0);
-		}
+		if (data->interface_type == MUSB_INTERFACE_UTMI)
+			otg_set_vbus(musb->xceiv->otg, 0);
 		omap_control_usb_set_mode(glue->control_otghs,
 			USB_MODE_DISCONNECT);
 		break;
-- 
1.7.10.4


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

* [PATCH 1/5] usb: musb: omap: remove the check before calling otg_set_vbus
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

No functional change. otg_set_vbus is already protected so removed the
check before calling otg_set_vbus.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 558c1d6..78bfc50 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -174,8 +174,7 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
 				}
 			}
 
-			if (otg->set_vbus)
-				otg_set_vbus(otg, 1);
+			otg_set_vbus(otg, 1);
 		} else {
 			musb->is_active = 1;
 			otg->default_a = 1;
@@ -293,10 +292,8 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
 		}
 
 		omap2430_musb_set_vbus(musb, 0);
-		if (data->interface_type == MUSB_INTERFACE_UTMI) {
-			if (musb->xceiv->otg->set_vbus)
-				otg_set_vbus(musb->xceiv->otg, 0);
-		}
+		if (data->interface_type == MUSB_INTERFACE_UTMI)
+			otg_set_vbus(musb->xceiv->otg, 0);
 		omap_control_usb_set_mode(glue->control_otghs,
 			USB_MODE_DISCONNECT);
 		break;
-- 
1.7.10.4

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

* [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  -1 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

In the case where omap glue is loaded and musb core is not, glue->status
wont have a valid status if the phy drivers call omap_musb_mailbox. So
fixed the conditions here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 78bfc50..28a0220 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -236,13 +236,10 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
 {
 	struct omap2430_glue	*glue = _glue;
 
-	if (glue && glue_to_musb(glue)) {
-		glue->status = status;
-	} else {
-		pr_err("%s: musb core is not yet ready\n", __func__);
+	if (!glue)
 		return;
-	}
 
+	glue->status = status;
 	schedule_work(&glue->omap_musb_mailbox_work);
 }
 EXPORT_SYMBOL_GPL(omap_musb_mailbox);
@@ -307,7 +304,9 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
 {
 	struct omap2430_glue *glue = container_of(mailbox_work,
 				struct omap2430_glue, omap_musb_mailbox_work);
-	omap_musb_set_mailbox(glue);
+
+	if (glue_to_musb(glue))
+		omap_musb_set_mailbox(glue);
 }
 
 static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)
-- 
1.7.10.4


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

* [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

In the case where omap glue is loaded and musb core is not, glue->status
wont have a valid status if the phy drivers call omap_musb_mailbox. So
fixed the conditions here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 78bfc50..28a0220 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -236,13 +236,10 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
 {
 	struct omap2430_glue	*glue = _glue;
 
-	if (glue && glue_to_musb(glue)) {
-		glue->status = status;
-	} else {
-		pr_err("%s: musb core is not yet ready\n", __func__);
+	if (!glue)
 		return;
-	}
 
+	glue->status = status;
 	schedule_work(&glue->omap_musb_mailbox_work);
 }
 EXPORT_SYMBOL_GPL(omap_musb_mailbox);
@@ -307,7 +304,9 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
 {
 	struct omap2430_glue *glue = container_of(mailbox_work,
 				struct omap2430_glue, omap_musb_mailbox_work);
-	omap_musb_set_mailbox(glue);
+
+	if (glue_to_musb(glue))
+		omap_musb_set_mailbox(glue);
 }
 
 static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)
-- 
1.7.10.4

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

* [PATCH 3/5] usb: otg: twl4030: use devres API for regulator get and request irq
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  -1 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Used devres APIs devm_request_threaded_irq and devm_regulator_get for
requesting irq and for getting regulator respectively.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/otg/twl4030-usb.c |   28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 04b732e2..5b20bb4 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -470,7 +470,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 	/* Initialize 3.1V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB3V1_DEV_GRP);
 
-	twl->usb3v1 = regulator_get(twl->dev, "usb3v1");
+	twl->usb3v1 = devm_regulator_get(twl->dev, "usb3v1");
 	if (IS_ERR(twl->usb3v1))
 		return -ENODEV;
 
@@ -479,18 +479,18 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 	/* Initialize 1.5V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V5_DEV_GRP);
 
-	twl->usb1v5 = regulator_get(twl->dev, "usb1v5");
+	twl->usb1v5 = devm_regulator_get(twl->dev, "usb1v5");
 	if (IS_ERR(twl->usb1v5))
-		goto fail1;
+		return -ENODEV;
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V5_TYPE);
 
 	/* Initialize 1.8V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V8_DEV_GRP);
 
-	twl->usb1v8 = regulator_get(twl->dev, "usb1v8");
+	twl->usb1v8 = devm_regulator_get(twl->dev, "usb1v8");
 	if (IS_ERR(twl->usb1v8))
-		goto fail2;
+		return -ENODEV;
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
 
@@ -499,14 +499,6 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 			 TWL4030_PM_MASTER_PROTECT_KEY);
 
 	return 0;
-
-fail2:
-	regulator_put(twl->usb1v5);
-	twl->usb1v5 = NULL;
-fail1:
-	regulator_put(twl->usb3v1);
-	twl->usb3v1 = NULL;
-	return -ENODEV;
 }
 
 static ssize_t twl4030_usb_vbus_show(struct device *dev,
@@ -695,9 +687,9 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	 * need both handles, otherwise just one suffices.
 	 */
 	twl->irq_enabled = true;
-	status = request_threaded_irq(twl->irq, NULL, twl4030_usb_irq,
-			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
-			IRQF_ONESHOT, "twl4030_usb", twl);
+	status = devm_request_threaded_irq(twl->dev, twl->irq, NULL,
+			twl4030_usb_irq, IRQF_TRIGGER_FALLING |
+			IRQF_TRIGGER_RISING | IRQF_ONESHOT, "twl4030_usb", twl);
 	if (status < 0) {
 		dev_dbg(&pdev->dev, "can't get IRQ %d, err %d\n",
 			twl->irq, status);
@@ -716,7 +708,6 @@ static int __exit twl4030_usb_remove(struct platform_device *pdev)
 	int val;
 
 	cancel_delayed_work(&twl->id_workaround_work);
-	free_irq(twl->irq, twl);
 	device_remove_file(twl->dev, &dev_attr_vbus);
 
 	/* set transceiver mode to power on defaults */
@@ -738,9 +729,6 @@ static int __exit twl4030_usb_remove(struct platform_device *pdev)
 
 	if (!twl->asleep)
 		twl4030_phy_power(twl, 0);
-	regulator_put(twl->usb1v5);
-	regulator_put(twl->usb1v8);
-	regulator_put(twl->usb3v1);
 
 	return 0;
 }
-- 
1.7.10.4


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

* [PATCH 3/5] usb: otg: twl4030: use devres API for regulator get and request irq
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Used devres APIs devm_request_threaded_irq and devm_regulator_get for
requesting irq and for getting regulator respectively.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/otg/twl4030-usb.c |   28 ++++++++--------------------
 1 file changed, 8 insertions(+), 20 deletions(-)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 04b732e2..5b20bb4 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -470,7 +470,7 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 	/* Initialize 3.1V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB3V1_DEV_GRP);
 
-	twl->usb3v1 = regulator_get(twl->dev, "usb3v1");
+	twl->usb3v1 = devm_regulator_get(twl->dev, "usb3v1");
 	if (IS_ERR(twl->usb3v1))
 		return -ENODEV;
 
@@ -479,18 +479,18 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 	/* Initialize 1.5V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V5_DEV_GRP);
 
-	twl->usb1v5 = regulator_get(twl->dev, "usb1v5");
+	twl->usb1v5 = devm_regulator_get(twl->dev, "usb1v5");
 	if (IS_ERR(twl->usb1v5))
-		goto fail1;
+		return -ENODEV;
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V5_TYPE);
 
 	/* Initialize 1.8V regulator */
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V8_DEV_GRP);
 
-	twl->usb1v8 = regulator_get(twl->dev, "usb1v8");
+	twl->usb1v8 = devm_regulator_get(twl->dev, "usb1v8");
 	if (IS_ERR(twl->usb1v8))
-		goto fail2;
+		return -ENODEV;
 
 	twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, 0, VUSB1V8_TYPE);
 
@@ -499,14 +499,6 @@ static int twl4030_usb_ldo_init(struct twl4030_usb *twl)
 			 TWL4030_PM_MASTER_PROTECT_KEY);
 
 	return 0;
-
-fail2:
-	regulator_put(twl->usb1v5);
-	twl->usb1v5 = NULL;
-fail1:
-	regulator_put(twl->usb3v1);
-	twl->usb3v1 = NULL;
-	return -ENODEV;
 }
 
 static ssize_t twl4030_usb_vbus_show(struct device *dev,
@@ -695,9 +687,9 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	 * need both handles, otherwise just one suffices.
 	 */
 	twl->irq_enabled = true;
-	status = request_threaded_irq(twl->irq, NULL, twl4030_usb_irq,
-			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING |
-			IRQF_ONESHOT, "twl4030_usb", twl);
+	status = devm_request_threaded_irq(twl->dev, twl->irq, NULL,
+			twl4030_usb_irq, IRQF_TRIGGER_FALLING |
+			IRQF_TRIGGER_RISING | IRQF_ONESHOT, "twl4030_usb", twl);
 	if (status < 0) {
 		dev_dbg(&pdev->dev, "can't get IRQ %d, err %d\n",
 			twl->irq, status);
@@ -716,7 +708,6 @@ static int __exit twl4030_usb_remove(struct platform_device *pdev)
 	int val;
 
 	cancel_delayed_work(&twl->id_workaround_work);
-	free_irq(twl->irq, twl);
 	device_remove_file(twl->dev, &dev_attr_vbus);
 
 	/* set transceiver mode to power on defaults */
@@ -738,9 +729,6 @@ static int __exit twl4030_usb_remove(struct platform_device *pdev)
 
 	if (!twl->asleep)
 		twl4030_phy_power(twl, 0);
-	regulator_put(twl->usb1v5);
-	regulator_put(twl->usb1v8);
-	regulator_put(twl->usb3v1);
 
 	return 0;
 }
-- 
1.7.10.4

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

* [PATCH 4/5] usb: musb: omap: add usb_phy_init in omap2430_musb_init
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  -1 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Some PHYs load too early (twl4030) making omap glue to miss cable connect events
if the board is booted with cable connected. So adding usb_phy_init in
omap2430_musb_init lets PHYs to report events once glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 28a0220..0786495 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -386,6 +386,8 @@ static int omap2430_musb_init(struct musb *musb)
 	if (glue->status != OMAP_MUSB_UNKNOWN)
 		omap_musb_set_mailbox(glue);
 
+	usb_phy_init(musb->xceiv);
+
 	pm_runtime_put_noidle(musb->controller);
 	return 0;
 
-- 
1.7.10.4


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

* [PATCH 4/5] usb: musb: omap: add usb_phy_init in omap2430_musb_init
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Some PHYs load too early (twl4030) making omap glue to miss cable connect events
if the board is booted with cable connected. So adding usb_phy_init in
omap2430_musb_init lets PHYs to report events once glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/musb/omap2430.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 28a0220..0786495 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -386,6 +386,8 @@ static int omap2430_musb_init(struct musb *musb)
 	if (glue->status != OMAP_MUSB_UNKNOWN)
 		omap_musb_set_mailbox(glue);
 
+	usb_phy_init(musb->xceiv);
+
 	pm_runtime_put_noidle(musb->controller);
 	return 0;
 
-- 
1.7.10.4

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

* [PATCH 5/5] usb: otg: twl4030: fix cold plug on OMAP3
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  -1 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Having twl4030_usb_phy_init() (detects if a cable is connected before
twl4030 is probed) in twl4030 probe makes cable connect events to be
missed by musb glue, since it gets loaded after twl4030. Having
twl4030_usb_phy_init as a usb_phy ops lets twl4030_usb_phy_init to be
called when glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/otg/twl4030-usb.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 5b20bb4..4040124 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -565,8 +565,9 @@ static void twl4030_id_workaround_work(struct work_struct *work)
 	}
 }
 
-static void twl4030_usb_phy_init(struct twl4030_usb *twl)
+static int twl4030_usb_phy_init(struct usb_phy *phy)
 {
+	struct twl4030_usb *twl = phy_to_twl(phy);
 	enum omap_musb_vbus_id_status status;
 
 	/*
@@ -581,6 +582,7 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl)
 		omap_musb_mailbox(twl->linkstat);
 
 	sysfs_notify(&twl->dev->kobj, NULL, "vbus");
+	return 0;
 }
 
 static int twl4030_set_suspend(struct usb_phy *x, int suspend)
@@ -657,6 +659,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	twl->phy.otg		= otg;
 	twl->phy.type		= USB_PHY_TYPE_USB2;
 	twl->phy.set_suspend	= twl4030_set_suspend;
+	twl->phy.init		= twl4030_usb_phy_init;
 
 	otg->phy		= &twl->phy;
 	otg->set_host		= twl4030_set_host;
@@ -696,8 +699,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 		return status;
 	}
 
-	twl4030_usb_phy_init(twl);
-
 	dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
 	return 0;
 }
-- 
1.7.10.4


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

* [PATCH 5/5] usb: otg: twl4030: fix cold plug on OMAP3
@ 2013-03-13  8:47   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 24+ messages in thread
From: Kishon Vijay Abraham I @ 2013-03-13  8:47 UTC (permalink / raw)
  To: balbi, gregkh, linux-usb, linux-omap, linux-kernel
  Cc: tony, notasas, Kishon Vijay Abraham I

Having twl4030_usb_phy_init() (detects if a cable is connected before
twl4030 is probed) in twl4030 probe makes cable connect events to be
missed by musb glue, since it gets loaded after twl4030. Having
twl4030_usb_phy_init as a usb_phy ops lets twl4030_usb_phy_init to be
called when glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/usb/otg/twl4030-usb.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 5b20bb4..4040124 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -565,8 +565,9 @@ static void twl4030_id_workaround_work(struct work_struct *work)
 	}
 }
 
-static void twl4030_usb_phy_init(struct twl4030_usb *twl)
+static int twl4030_usb_phy_init(struct usb_phy *phy)
 {
+	struct twl4030_usb *twl = phy_to_twl(phy);
 	enum omap_musb_vbus_id_status status;
 
 	/*
@@ -581,6 +582,7 @@ static void twl4030_usb_phy_init(struct twl4030_usb *twl)
 		omap_musb_mailbox(twl->linkstat);
 
 	sysfs_notify(&twl->dev->kobj, NULL, "vbus");
+	return 0;
 }
 
 static int twl4030_set_suspend(struct usb_phy *x, int suspend)
@@ -657,6 +659,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	twl->phy.otg		= otg;
 	twl->phy.type		= USB_PHY_TYPE_USB2;
 	twl->phy.set_suspend	= twl4030_set_suspend;
+	twl->phy.init		= twl4030_usb_phy_init;
 
 	otg->phy		= &twl->phy;
 	otg->set_host		= twl4030_set_host;
@@ -696,8 +699,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 		return status;
 	}
 
-	twl4030_usb_phy_init(twl);
-
 	dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
 	return 0;
 }
-- 
1.7.10.4

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

* Re: [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status
  2013-03-13  8:47   ` Kishon Vijay Abraham I
  (?)
@ 2013-03-13 21:59   ` Grazvydas Ignotas
  2013-03-14  5:26       ` kishon
  -1 siblings, 1 reply; 24+ messages in thread
From: Grazvydas Ignotas @ 2013-03-13 21:59 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony

On Wed, Mar 13, 2013 at 10:47 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> In the case where omap glue is loaded and musb core is not, glue->status
> wont have a valid status if the phy drivers call omap_musb_mailbox. So
> fixed the conditions here.

There already seems to be another patch named "usb: musb: omap2430:
fix omap_musb_mailbox glue check again" on it's way to mainline that
does mostly the same as first part of this patch.

>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/usb/musb/omap2430.c |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 78bfc50..28a0220 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -236,13 +236,10 @@ void omap_musb_mailbox(enum omap_musb_vbus_id_status status)
>  {
>         struct omap2430_glue    *glue = _glue;
>
> -       if (glue && glue_to_musb(glue)) {
> -               glue->status = status;
> -       } else {
> -               pr_err("%s: musb core is not yet ready\n", __func__);
> +       if (!glue)
>                 return;
> -       }
>
> +       glue->status = status;
>         schedule_work(&glue->omap_musb_mailbox_work);
>  }
>  EXPORT_SYMBOL_GPL(omap_musb_mailbox);
> @@ -307,7 +304,9 @@ static void omap_musb_mailbox_work(struct work_struct *mailbox_work)
>  {
>         struct omap2430_glue *glue = container_of(mailbox_work,
>                                 struct omap2430_glue, omap_musb_mailbox_work);
> -       omap_musb_set_mailbox(glue);
> +
> +       if (glue_to_musb(glue))
> +               omap_musb_set_mailbox(glue);
>  }
>
>  static irqreturn_t omap2430_musb_interrupt(int irq, void *__hci)
> --
> 1.7.10.4
>

-- 
Gražvydas

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2013-03-13  8:47 ` Kishon Vijay Abraham I
                   ` (5 preceding siblings ...)
  (?)
@ 2013-03-13 22:00 ` Grazvydas Ignotas
  -1 siblings, 0 replies; 24+ messages in thread
From: Grazvydas Ignotas @ 2013-03-13 22:00 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony

On Wed, Mar 13, 2013 at 10:47 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> This series has some misc cleanup and fixes. The fix solves the cold
> plug issue in omap3 which some have reported. Developed these patches on
> Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
> (Grazvydas Ignotas patch series)
>
> Tested for g_zero enumeration in pandaboard and beagleboard in both
> cold plug and hot plug case. Any kind of testing for this series is welcome.
>
> Kishon Vijay Abraham I (5):
>   usb: musb: omap: remove the check before calling otg_set_vbus
>   usb: musb: omap: always glue have the correct vbus/id status
>   usb: otg: twl4030: use devres API for regulator get and request irq
>   usb: musb: omap: add usb_phy_init in omap2430_musb_init
>   usb: otg: twl4030: fix cold plug on OMAP3

Looks and works good for me on pandora.
Tested-by: Grazvydas Ignotas <notasas@gmail.com>

>  drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
>  drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
>  2 files changed, 22 insertions(+), 35 deletions(-)
>
> --
> 1.7.10.4
>



-- 
Gražvydas

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

* Re: [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status
  2013-03-13 21:59   ` Grazvydas Ignotas
@ 2013-03-14  5:26       ` kishon
  0 siblings, 0 replies; 24+ messages in thread
From: kishon @ 2013-03-14  5:26 UTC (permalink / raw)
  To: Grazvydas Ignotas
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony

On Thursday 14 March 2013 03:29 AM, Grazvydas Ignotas wrote:
> On Wed, Mar 13, 2013 at 10:47 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>> In the case where omap glue is loaded and musb core is not, glue->status
>> wont have a valid status if the phy drivers call omap_musb_mailbox. So
>> fixed the conditions here.
>
> There already seems to be another patch named "usb: musb: omap2430:
> fix omap_musb_mailbox glue check again" on it's way to mainline that
> does mostly the same as first part of this patch.

Oh yeah. Missed that.

Thanks
Kishon

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

* Re: [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status
@ 2013-03-14  5:26       ` kishon
  0 siblings, 0 replies; 24+ messages in thread
From: kishon @ 2013-03-14  5:26 UTC (permalink / raw)
  To: Grazvydas Ignotas
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony

On Thursday 14 March 2013 03:29 AM, Grazvydas Ignotas wrote:
> On Wed, Mar 13, 2013 at 10:47 AM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
>> In the case where omap glue is loaded and musb core is not, glue->status
>> wont have a valid status if the phy drivers call omap_musb_mailbox. So
>> fixed the conditions here.
>
> There already seems to be another patch named "usb: musb: omap2430:
> fix omap_musb_mailbox glue check again" on it's way to mainline that
> does mostly the same as first part of this patch.

Oh yeah. Missed that.

Thanks
Kishon

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2013-03-13  8:47 ` Kishon Vijay Abraham I
@ 2013-03-20 13:12   ` Felipe Balbi
  -1 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2013-03-20 13:12 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
> This series has some misc cleanup and fixes. The fix solves the cold
> plug issue in omap3 which some have reported. Developed these patches on
> Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
> (Grazvydas Ignotas patch series)
> 
> Tested for g_zero enumeration in pandaboard and beagleboard in both
> cold plug and hot plug case. Any kind of testing for this series is welcome.
> 
> Kishon Vijay Abraham I (5):
>   usb: musb: omap: remove the check before calling otg_set_vbus
>   usb: musb: omap: always glue have the correct vbus/id status
>   usb: otg: twl4030: use devres API for regulator get and request irq
>   usb: musb: omap: add usb_phy_init in omap2430_musb_init
>   usb: otg: twl4030: fix cold plug on OMAP3
> 
>  drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
>  drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
>  2 files changed, 22 insertions(+), 35 deletions(-)

this needs to be rebased against my 'next' branch.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
@ 2013-03-20 13:12   ` Felipe Balbi
  0 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2013-03-20 13:12 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
> This series has some misc cleanup and fixes. The fix solves the cold
> plug issue in omap3 which some have reported. Developed these patches on
> Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
> (Grazvydas Ignotas patch series)
> 
> Tested for g_zero enumeration in pandaboard and beagleboard in both
> cold plug and hot plug case. Any kind of testing for this series is welcome.
> 
> Kishon Vijay Abraham I (5):
>   usb: musb: omap: remove the check before calling otg_set_vbus
>   usb: musb: omap: always glue have the correct vbus/id status
>   usb: otg: twl4030: use devres API for regulator get and request irq
>   usb: musb: omap: add usb_phy_init in omap2430_musb_init
>   usb: otg: twl4030: fix cold plug on OMAP3
> 
>  drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
>  drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
>  2 files changed, 22 insertions(+), 35 deletions(-)

this needs to be rebased against my 'next' branch.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2013-03-20 13:12   ` Felipe Balbi
@ 2013-03-20 15:22     ` kishon
  -1 siblings, 0 replies; 24+ messages in thread
From: kishon @ 2013-03-20 15:22 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

Felipe,

On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:
> On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
>> This series has some misc cleanup and fixes. The fix solves the cold
>> plug issue in omap3 which some have reported. Developed these patches on
>> Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
>> (Grazvydas Ignotas patch series)
>>
>> Tested for g_zero enumeration in pandaboard and beagleboard in both
>> cold plug and hot plug case. Any kind of testing for this series is welcome.
>>
>> Kishon Vijay Abraham I (5):
>>    usb: musb: omap: remove the check before calling otg_set_vbus
>>    usb: musb: omap: always glue have the correct vbus/id status
>>    usb: otg: twl4030: use devres API for regulator get and request irq
>>    usb: musb: omap: add usb_phy_init in omap2430_musb_init
>>    usb: otg: twl4030: fix cold plug on OMAP3
>>
>>   drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
>>   drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
>>   2 files changed, 22 insertions(+), 35 deletions(-)
>
> this needs to be rebased against my 'next' branch.

The v2 of this series is already in your testing branch. You still want 
it to be rebased to your 'next' branch?

Thanks
Kishon

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
@ 2013-03-20 15:22     ` kishon
  0 siblings, 0 replies; 24+ messages in thread
From: kishon @ 2013-03-20 15:22 UTC (permalink / raw)
  To: balbi; +Cc: gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

Felipe,

On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:
> On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
>> This series has some misc cleanup and fixes. The fix solves the cold
>> plug issue in omap3 which some have reported. Developed these patches on
>> Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
>> (Grazvydas Ignotas patch series)
>>
>> Tested for g_zero enumeration in pandaboard and beagleboard in both
>> cold plug and hot plug case. Any kind of testing for this series is welcome.
>>
>> Kishon Vijay Abraham I (5):
>>    usb: musb: omap: remove the check before calling otg_set_vbus
>>    usb: musb: omap: always glue have the correct vbus/id status
>>    usb: otg: twl4030: use devres API for regulator get and request irq
>>    usb: musb: omap: add usb_phy_init in omap2430_musb_init
>>    usb: otg: twl4030: fix cold plug on OMAP3
>>
>>   drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
>>   drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
>>   2 files changed, 22 insertions(+), 35 deletions(-)
>
> this needs to be rebased against my 'next' branch.

The v2 of this series is already in your testing branch. You still want 
it to be rebased to your 'next' branch?

Thanks
Kishon

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2013-03-20 15:22     ` kishon
@ 2013-03-20 15:59       ` Felipe Balbi
  -1 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2013-03-20 15:59 UTC (permalink / raw)
  To: kishon; +Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

On Wed, Mar 20, 2013 at 08:52:36PM +0530, kishon wrote:
> Felipe,
> 
> On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:
> >On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
> >>This series has some misc cleanup and fixes. The fix solves the cold
> >>plug issue in omap3 which some have reported. Developed these patches on
> >>Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
> >>(Grazvydas Ignotas patch series)
> >>
> >>Tested for g_zero enumeration in pandaboard and beagleboard in both
> >>cold plug and hot plug case. Any kind of testing for this series is welcome.
> >>
> >>Kishon Vijay Abraham I (5):
> >>   usb: musb: omap: remove the check before calling otg_set_vbus
> >>   usb: musb: omap: always glue have the correct vbus/id status
> >>   usb: otg: twl4030: use devres API for regulator get and request irq
> >>   usb: musb: omap: add usb_phy_init in omap2430_musb_init
> >>   usb: otg: twl4030: fix cold plug on OMAP3
> >>
> >>  drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
> >>  drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
> >>  2 files changed, 22 insertions(+), 35 deletions(-)
> >
> >this needs to be rebased against my 'next' branch.
> 
> The v2 of this series is already in your testing branch. You still
> want it to be rebased to your 'next' branch?

sorry, no need. I just forgot to mark this one as read. My bad.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
@ 2013-03-20 15:59       ` Felipe Balbi
  0 siblings, 0 replies; 24+ messages in thread
From: Felipe Balbi @ 2013-03-20 15:59 UTC (permalink / raw)
  To: kishon; +Cc: balbi, gregkh, linux-usb, linux-omap, linux-kernel, tony, notasas

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

On Wed, Mar 20, 2013 at 08:52:36PM +0530, kishon wrote:
> Felipe,
> 
> On Wednesday 20 March 2013 06:42 PM, Felipe Balbi wrote:
> >On Wed, Mar 13, 2013 at 02:17:05PM +0530, Kishon Vijay Abraham I wrote:
> >>This series has some misc cleanup and fixes. The fix solves the cold
> >>plug issue in omap3 which some have reported. Developed these patches on
> >>Linux 3.9-rc2 after applying http://www.spinics.net/lists/linux-usb/msg81563.html
> >>(Grazvydas Ignotas patch series)
> >>
> >>Tested for g_zero enumeration in pandaboard and beagleboard in both
> >>cold plug and hot plug case. Any kind of testing for this series is welcome.
> >>
> >>Kishon Vijay Abraham I (5):
> >>   usb: musb: omap: remove the check before calling otg_set_vbus
> >>   usb: musb: omap: always glue have the correct vbus/id status
> >>   usb: otg: twl4030: use devres API for regulator get and request irq
> >>   usb: musb: omap: add usb_phy_init in omap2430_musb_init
> >>   usb: otg: twl4030: fix cold plug on OMAP3
> >>
> >>  drivers/usb/musb/omap2430.c   |   22 ++++++++++------------
> >>  drivers/usb/otg/twl4030-usb.c |   35 ++++++++++++-----------------------
> >>  2 files changed, 22 insertions(+), 35 deletions(-)
> >
> >this needs to be rebased against my 'next' branch.
> 
> The v2 of this series is already in your testing branch. You still
> want it to be rebased to your 'next' branch?

sorry, no need. I just forgot to mark this one as read. My bad.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2013-03-13  8:47 ` Kishon Vijay Abraham I
                   ` (7 preceding siblings ...)
  (?)
@ 2014-06-02  7:31 ` sarfaraz5286
  2014-06-04  6:21   ` sarfaraz5286
  -1 siblings, 1 reply; 24+ messages in thread
From: sarfaraz5286 @ 2014-06-02  7:31 UTC (permalink / raw)
  To: linux-kernel

I have a battery operated android device. for charging I have a docking
station. to copy the images USB stick is attached to the docking station
while device is also inserted in docking station.

I have the following issue

when I power off the docking station my USB stick is not detected even
though my android device is attached in docking station how can I set the
vbus on in twl4030.c driver code.
there must be somewhere int he code that it checks both power supply and USB
both on to load the drivers, so at that point I can just check for the USB
and not the power supply.

Thanks.



--
View this message in context: http://linux-kernel.2935.n7.nabble.com/PATCH-0-5-usb-musb-otg-cleanup-and-fixes-tp615388p872314.html
Sent from the Linux Kernel mailing list archive at Nabble.com.

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

* Re: [PATCH 0/5] usb: musb/otg: cleanup and fixes
  2014-06-02  7:31 ` sarfaraz5286
@ 2014-06-04  6:21   ` sarfaraz5286
  0 siblings, 0 replies; 24+ messages in thread
From: sarfaraz5286 @ 2014-06-04  6:21 UTC (permalink / raw)
  To: linux-kernel

Android device is battery operated I have docking station to charge it and
also usb is attached to transfer data from android device to pendrive
pendrive is detected when android device is put on charging otherwise it is
not detected.



--
View this message in context: http://linux-kernel.2935.n7.nabble.com/PATCH-0-5-usb-musb-otg-cleanup-and-fixes-tp615388p874113.html
Sent from the Linux Kernel mailing list archive at Nabble.com.

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

end of thread, other threads:[~2014-06-04  6:21 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13  8:47 [PATCH 0/5] usb: musb/otg: cleanup and fixes Kishon Vijay Abraham I
2013-03-13  8:47 ` Kishon Vijay Abraham I
2013-03-13  8:47 ` [PATCH 1/5] usb: musb: omap: remove the check before calling otg_set_vbus Kishon Vijay Abraham I
2013-03-13  8:47   ` Kishon Vijay Abraham I
2013-03-13  8:47 ` [PATCH 2/5] usb: musb: omap: always glue have the correct vbus/id status Kishon Vijay Abraham I
2013-03-13  8:47   ` Kishon Vijay Abraham I
2013-03-13 21:59   ` Grazvydas Ignotas
2013-03-14  5:26     ` kishon
2013-03-14  5:26       ` kishon
2013-03-13  8:47 ` [PATCH 3/5] usb: otg: twl4030: use devres API for regulator get and request irq Kishon Vijay Abraham I
2013-03-13  8:47   ` Kishon Vijay Abraham I
2013-03-13  8:47 ` [PATCH 4/5] usb: musb: omap: add usb_phy_init in omap2430_musb_init Kishon Vijay Abraham I
2013-03-13  8:47   ` Kishon Vijay Abraham I
2013-03-13  8:47 ` [PATCH 5/5] usb: otg: twl4030: fix cold plug on OMAP3 Kishon Vijay Abraham I
2013-03-13  8:47   ` Kishon Vijay Abraham I
2013-03-13 22:00 ` [PATCH 0/5] usb: musb/otg: cleanup and fixes Grazvydas Ignotas
2013-03-20 13:12 ` Felipe Balbi
2013-03-20 13:12   ` Felipe Balbi
2013-03-20 15:22   ` kishon
2013-03-20 15:22     ` kishon
2013-03-20 15:59     ` Felipe Balbi
2013-03-20 15:59       ` Felipe Balbi
2014-06-02  7:31 ` sarfaraz5286
2014-06-04  6:21   ` sarfaraz5286

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.