* [1/7 v3] usb: otg: enable regulator only on cable/device connect
@ 2011-02-16 11:50 Hema HK
2011-02-16 11:50 ` [3/7 v3] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, Kalliguddi, Hema, Felipe Balbi
From: Kalliguddi, Hema <hemahk@ti.com>
Remove the regulator enable while driver loading and enable it only when
the cable/device is connected and disable it when disconnected.
Remove the configuration of config_state and config_trans register
configuration as these registers are programmed when regulator
enable/disable is called.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/twl6030-usb.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
Index: linux-2.6/drivers/usb/otg/twl6030-usb.c
===================================================================
--- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c
+++ linux-2.6/drivers/usb/otg/twl6030-usb.c
@@ -158,8 +158,6 @@ static int twl6030_phy_init(struct otg_t
dev = twl->dev;
pdata = dev->platform_data;
- regulator_enable(twl->usb3v3);
-
hw_state = twl6030_readb(twl, TWL6030_MODULE_ID0, STS_HW_CONDITIONS);
if (hw_state & STS_USB_ID)
@@ -180,7 +178,6 @@ static void twl6030_phy_shutdown(struct
dev = twl->dev;
pdata = dev->platform_data;
pdata->phy_power(twl->dev, 0, 0);
- regulator_disable(twl->usb3v3);
}
static int twl6030_usb_ldo_init(struct twl6030_usb *twl)
@@ -199,16 +196,6 @@ static int twl6030_usb_ldo_init(struct t
if (IS_ERR(twl->usb3v3))
return -ENODEV;
- regulator_enable(twl->usb3v3);
-
- /* Program the VUSB_CFG_TRANS for ACTIVE state. */
- twl6030_writeb(twl, TWL_MODULE_PM_RECEIVER, 0x3F,
- VUSB_CFG_TRANS);
-
- /* Program the VUSB_CFG_STATE register to ON on all groups. */
- twl6030_writeb(twl, TWL_MODULE_PM_RECEIVER, 0xE1,
- VUSB_CFG_STATE);
-
/* Program the USB_VBUS_CTRL_SET and set VBUS_ACT_COMP bit */
twl6030_writeb(twl, TWL_MODULE_USB, 0x4, USB_VBUS_CTRL_SET);
@@ -261,16 +248,23 @@ static irqreturn_t twl6030_usb_irq(int i
CONTROLLER_STAT1);
if (!(hw_state & STS_USB_ID)) {
if (vbus_state & VBUS_DET) {
+ regulator_enable(twl->usb3v3);
+ twl->asleep = 1;
status = USB_EVENT_VBUS;
twl->otg.default_a = false;
twl->otg.state = OTG_STATE_B_IDLE;
+ twl->linkstat = status;
+ blocking_notifier_call_chain(&twl->otg.notifier,
+ status, twl->otg.gadget);
} else {
status = USB_EVENT_NONE;
- }
- if (status >= 0) {
twl->linkstat = status;
blocking_notifier_call_chain(&twl->otg.notifier,
status, twl->otg.gadget);
+ if (twl->asleep) {
+ regulator_disable(twl->usb3v3);
+ twl->asleep = 0;
+ }
}
}
sysfs_notify(&twl->dev->kobj, NULL, "vbus");
@@ -288,6 +282,8 @@ static irqreturn_t twl6030_usbotg_irq(in
if (hw_state & STS_USB_ID) {
+ regulator_enable(twl->usb3v3);
+ twl->asleep = 1;
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_CLR, 0x1);
twl6030_writeb(twl, TWL_MODULE_USB, USB_ID_INT_EN_HI_SET,
0x10);
@@ -437,6 +433,7 @@ static int __devinit twl6030_usb_probe(s
return status;
}
+ twl->asleep = 0;
pdata->phy_init(dev);
twl6030_enable_irq(&twl->otg);
dev_info(&pdev->dev, "Initialized TWL6030 USB module\n");
^ permalink raw reply [flat|nested] 8+ messages in thread
* [2/7 v3] usb: otg: Remove one unnecessary I2C read request.
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
@ 2011-02-16 11:50 ` Hema HK
2011-02-16 11:50 ` [6/7 v3] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK
2011-02-16 11:50 ` [7/7 v3] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK
2 siblings, 0 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Kalliguddi, Hema, Felipe Balbi
From: Kalliguddi, Hema <hemahk-l0cyMroinI0@public.gmane.org>
To get the ID status there was an I2C read transfer. Removed this I2C
read transfer as this info can be used from existing variable(linkstat).
Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---
drivers/usb/otg/twl6030-usb.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Index: linux-2.6/drivers/usb/otg/twl6030-usb.c
===================================================================
--- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c
+++ linux-2.6/drivers/usb/otg/twl6030-usb.c
@@ -149,7 +149,6 @@ static int twl6030_set_phy_clk(struct ot
static int twl6030_phy_init(struct otg_transceiver *x)
{
- u8 hw_state;
struct twl6030_usb *twl;
struct device *dev;
struct twl4030_usb_data *pdata;
@@ -158,9 +157,7 @@ static int twl6030_phy_init(struct otg_t
dev = twl->dev;
pdata = dev->platform_data;
- hw_state = twl6030_readb(twl, TWL6030_MODULE_ID0, STS_HW_CONDITIONS);
^ permalink raw reply [flat|nested] 8+ messages in thread
* [3/7 v3] usb: otg: OMAP4430: Introducing suspend function for power management
2011-02-16 11:50 [1/7 v3] usb: otg: enable regulator only on cable/device connect Hema HK
@ 2011-02-16 11:50 ` Hema HK
2011-02-16 11:50 ` [4/7 v3] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, Kalliguddi, Hema, Felipe Balbi, Tony Lindgren
From: Kalliguddi, Hema <hemahk@ti.com>
Introduced the suspend/resume function for the OMAP4430 internal PHY.
This will be used by the twl6030-usb transceiver driver.
Moved the clock enable/disable function calls and power on/off of the PHY
code from power on/off functions to suspend/resume function.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/omap_phy_internal.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
Index: linux-2.6/arch/arm/mach-omap2/omap_phy_internal.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/omap_phy_internal.c
+++ linux-2.6/arch/arm/mach-omap2/omap_phy_internal.c
@@ -103,13 +103,6 @@ int omap4430_phy_set_clk(struct device *
int omap4430_phy_power(struct device *dev, int ID, int on)
{
if (on) {
- /* enabled the clocks */
- omap4430_phy_set_clk(dev, 1);
- /* power on the phy */
- if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) {
- __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
- mdelay(200);
- }
if (ID)
/* enable VBUS valid, IDDIG groung */
__raw_writel(AVALID | VBUSVALID, ctrl_base +
@@ -125,10 +118,25 @@ int omap4430_phy_power(struct device *de
/* Enable session END and IDIG to high impedence. */
__raw_writel(SESSEND | IDDIG, ctrl_base +
USBOTGHS_CONTROL);
+ }
+ return 0;
+}
+
+int omap4430_phy_suspend(struct device *dev, int suspend)
+{
+ if (suspend) {
/* Disable the clocks */
omap4430_phy_set_clk(dev, 0);
/* Power down the phy */
__raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
+ } else {
+ /* Enable the internel phy clcoks */
+ omap4430_phy_set_clk(dev, 1);
+ /* power on the phy */
+ if (__raw_readl(ctrl_base + CONTROL_DEV_CONF) & PHY_PD) {
+ __raw_writel(~PHY_PD, ctrl_base + CONTROL_DEV_CONF);
+ mdelay(200);
+ }
}
return 0;
Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================
--- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h
+++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h
@@ -88,6 +88,7 @@ extern int omap4430_phy_power(struct dev
extern int omap4430_phy_set_clk(struct device *dev, int on);
extern int omap4430_phy_init(struct device *dev);
extern int omap4430_phy_exit(struct device *dev);
+extern int omap4430_phy_suspend(struct device *dev, int suspend);
#endif
^ permalink raw reply [flat|nested] 8+ messages in thread
* [4/7 v3] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data
2011-02-16 11:50 [1/7 v3] usb: otg: enable regulator only on cable/device connect Hema HK
2011-02-16 11:50 ` [3/7 v3] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK
@ 2011-02-16 11:50 ` Hema HK
[not found] ` <1297857049-27367-4-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 11:50 ` [5/7 v3] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function Hema HK
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
3 siblings, 1 reply; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, Kalliguddi, Hema, Felipe Balbi, Tony Lindgren
From: Kalliguddi, Hema <hemahk@ti.com>
Introduce the .phy_suspend function pointer to twl4030_usb_data structure.
assign the function to it for both sdp board and panda boards.
This will be used by the twl6030-usb transceiver driver.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 1 +
arch/arm/mach-omap2/board-omap4panda.c | 1 +
arch/arm/plat-omap/include/plat/usb.h | 1 +
include/linux/i2c/twl.h | 2 ++
4 files changed, 5 insertions(+)
Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/board-4430sdp.c
+++ linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
@@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb
.phy_exit = omap4430_phy_exit,
.phy_power = omap4430_phy_power,
.phy_set_clock = omap4430_phy_set_clk,
+ .phy_suspend = omap4430_phy_suspend,
};
static struct omap2_hsmmc_info mmc[] = {
Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
===================================================================
--- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c
+++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
@@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb
.phy_exit = omap4430_phy_exit,
.phy_power = omap4430_phy_power,
.phy_set_clock = omap4430_phy_set_clk,
+ .phy_suspend = omap4430_phy_suspend,
};
static struct omap2_hsmmc_info mmc[] = {
Index: linux-2.6/include/linux/i2c/twl.h
===================================================================
--- linux-2.6.orig/include/linux/i2c/twl.h
+++ linux-2.6/include/linux/i2c/twl.h
@@ -600,6 +600,8 @@ struct twl4030_usb_data {
int (*phy_power)(struct device *dev, int iD, int on);
/* enable/disable phy clocks */
int (*phy_set_clock)(struct device *dev, int on);
+ /* suspend/resume of phy */
+ int (*phy_suspend)(struct device *dev, int suspend);
};
struct twl4030_ins {
^ permalink raw reply [flat|nested] 8+ messages in thread
* [5/7 v3] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function.
2011-02-16 11:50 [1/7 v3] usb: otg: enable regulator only on cable/device connect Hema HK
2011-02-16 11:50 ` [3/7 v3] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK
2011-02-16 11:50 ` [4/7 v3] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK
@ 2011-02-16 11:50 ` Hema HK
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
3 siblings, 0 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb; +Cc: linux-omap, Kalliguddi, Hema, Felipe Balbi
From: Kalliguddi, Hema <hemahk@ti.com>
Introduce the twl6030_phy_suspend function and assign to otg.set_suspend
function pointer.
This function is used by the musb-omap2430 platform driver
during suspend/resume.
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
---
drivers/usb/otg/twl6030-usb.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
Index: linux-2.6/drivers/usb/otg/twl6030-usb.c
===================================================================
--- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c
+++ linux-2.6/drivers/usb/otg/twl6030-usb.c
@@ -177,6 +177,17 @@ static void twl6030_phy_shutdown(struct
pdata->phy_power(twl->dev, 0, 0);
}
+static int twl6030_phy_suspend(struct otg_transceiver *x, int suspend)
+{
+ struct twl6030_usb *twl = xceiv_to_twl(x);
+ struct device *dev = twl->dev;
+ struct twl4030_usb_data *pdata = dev->platform_data;
+
+ pdata->phy_suspend(dev, suspend);
+
+ return 0;
+}
+
static int twl6030_usb_ldo_init(struct twl6030_usb *twl)
{
@@ -388,6 +399,7 @@ static int __devinit twl6030_usb_probe(s
twl->otg.set_vbus = twl6030_set_vbus;
twl->otg.init = twl6030_phy_init;
twl->otg.shutdown = twl6030_phy_shutdown;
+ twl->otg.set_suspend = twl6030_phy_suspend;
/* init spinlock for workqueue */
spin_lock_init(&twl->lock);
@@ -432,6 +444,7 @@ static int __devinit twl6030_usb_probe(s
twl->asleep = 0;
pdata->phy_init(dev);
+ twl6030_phy_suspend(&twl->otg, 0);
twl6030_enable_irq(&twl->otg);
dev_info(&pdev->dev, "Initialized TWL6030 USB module\n");
^ permalink raw reply [flat|nested] 8+ messages in thread
* [6/7 v3] usb: otg: TWL6030 Save the last event in otg_transceiver
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 11:50 ` [2/7 v3] usb: otg: Remove one unnecessary I2C read request Hema HK
@ 2011-02-16 11:50 ` Hema HK
2011-02-16 11:50 ` [7/7 v3] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK
2 siblings, 0 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Kalliguddi, Hema, Felipe Balbi
From: Kalliguddi, Hema <hemahk-l0cyMroinI0@public.gmane.org>
Save the last event in the otg_transceiver so that it can used in the
musb driver and gadget driver to configure the musb and enable the
vbus for host mode and OTG mode, if the device is connected during boot.
Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---
[Reusing some part of the patch[1] posted by Arnaud Mandy]
[1] http://permalink.gmane.org/gmane.linux.usb.general/37123
---
drivers/usb/otg/twl6030-usb.c | 3 +++
include/linux/usb/otg.h | 1 +
2 files changed, 4 insertions(+)
Index: linux-2.6/drivers/usb/otg/twl6030-usb.c
===================================================================
--- linux-2.6.orig/drivers/usb/otg/twl6030-usb.c
+++ linux-2.6/drivers/usb/otg/twl6030-usb.c
@@ -262,11 +262,13 @@ static irqreturn_t twl6030_usb_irq(int i
twl->otg.default_a = false;
twl->otg.state = OTG_STATE_B_IDLE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier,
status, twl->otg.gadget);
} else {
status = USB_EVENT_NONE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier,
status, twl->otg.gadget);
if (twl->asleep) {
@@ -299,6 +301,7 @@ static irqreturn_t twl6030_usbotg_irq(in
twl->otg.default_a = true;
twl->otg.state = OTG_STATE_A_IDLE;
twl->linkstat = status;
+ twl->otg.last_event = status;
blocking_notifier_call_chain(&twl->otg.notifier, status,
twl->otg.gadget);
} else {
Index: linux-2.6/include/linux/usb/otg.h
===================================================================
--- linux-2.6.orig/include/linux/usb/otg.h
+++ linux-2.6/include/linux/usb/otg.h
@@ -66,6 +66,7 @@ struct otg_transceiver {
u8 default_a;
enum usb_otg_state state;
+ enum usb_xceiv_events last_event;
struct usb_bus *host;
struct usb_gadget *gadget;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [7/7 v3] usb: musb: OMAP4430: Fix usb device detection if connected during boot
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 11:50 ` [2/7 v3] usb: otg: Remove one unnecessary I2C read request Hema HK
2011-02-16 11:50 ` [6/7 v3] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK
@ 2011-02-16 11:50 ` Hema HK
2 siblings, 0 replies; 8+ messages in thread
From: Hema HK @ 2011-02-16 11:50 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA, Kalliguddi, Hema, Felipe Balbi
From: Kalliguddi, Hema <hemahk-l0cyMroinI0@public.gmane.org>
OMAP4430 is embedded with UTMI PHY. This PHY does not support the
OTG features like ID pin detection and VBUS detection. This function
is exported to an external companion chip TWL6030. Software must retrieve
the OTG HNP and SRP status from the TWL6030 and configure the bits inside
the control module that drive the related USBOTGHS UTMI interface signals.
It must also read back the UTMI signals needed to configure the TWL6030
OTG module.
Can find more details in the TRM[1].
[1]:http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.0_Public_TRM_vJ.pdf
In OMAP4430 musb driver VBUS and ID notifications are received from the
transceiver driver. If the cable/device is connected during boot,
notifications from transceiver driver will be missed till musb driver
is loaded.
Patch to configure the transceiver in the platform_enable/disable
functions and enable the vbus in the gadget driver based on the
last_event of the otg_transceiver.
Signed-off-by: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
Cc: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
---
drivers/usb/musb/musb_gadget.c | 4 +++
drivers/usb/musb/omap2430.c | 49 ++++++++++++++++++++++++++++++++++++-----
2 files changed, 48 insertions(+), 5 deletions(-)
Index: linux-2.6/drivers/usb/musb/musb_gadget.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/musb_gadget.c
+++ linux-2.6/drivers/usb/musb/musb_gadget.c
@@ -1855,6 +1855,10 @@ int usb_gadget_probe_driver(struct usb_g
} else {
hcd->self.uses_pio_for_control = 1;
}
+
+ if ((musb->xceiv->last_event == USB_EVENT_ID)
+ && musb->xceiv->set_vbus)
+ otg_set_vbus(musb->xceiv, 1);
}
}
Index: linux-2.6/drivers/usb/musb/omap2430.c
===================================================================
--- linux-2.6.orig/drivers/usb/musb/omap2430.c
+++ linux-2.6/drivers/usb/musb/omap2430.c
@@ -350,16 +350,56 @@ static int omap2430_musb_init(struct mus
if (status)
DBG(1, "notification register failed\n");
- /* check whether cable is already connected */
- if (musb->xceiv->state ==OTG_STATE_B_IDLE)
- musb_otg_notifications(&musb->nb, 1,
- musb->xceiv->gadget);
-
setup_timer(&musb_idle_timer, musb_do_idle, (unsigned long) musb);
return 0;
}
+static void omap2430_musb_enable(struct musb *musb)
+{
+ u8 devctl;
+ unsigned long timeout = jiffies + msecs_to_jiffies(1000);
+ struct device *dev = musb->controller;
+ struct musb_hdrc_platform_data *pdata = dev->platform_data;
+ struct omap_musb_board_data *data = pdata->board_data;
+
+ switch (musb->xceiv->last_event) {
+
+ case USB_EVENT_ID:
+ otg_init(musb->xceiv);
+ if (data->interface_type == MUSB_INTERFACE_UTMI) {
+ devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
+ /* start the session */
+ devctl |= MUSB_DEVCTL_SESSION;
+ musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
+ while (musb_readb(musb->mregs, MUSB_DEVCTL) &
+ MUSB_DEVCTL_BDEVICE) {
+ cpu_relax();
+
+ if (time_after(jiffies, timeout)) {
+ dev_err(musb->controller,
+ "configured as A device timeout");
+ break;
+ }
+ }
+ }
+ break;
+
+ case USB_EVENT_VBUS:
+ otg_init(musb->xceiv);
+ break;
+
+ default:
+ break;
+ }
+}
+
+static void omap2430_musb_disable(struct musb *musb)
+{
+ if (musb->xceiv->last_event)
+ otg_shutdown(musb->xceiv);
+}
+
static int omap2430_musb_exit(struct musb *musb)
{
@@ -377,6 +417,9 @@ static const struct musb_platform_ops om
.try_idle = omap2430_musb_try_idle,
.set_vbus = omap2430_musb_set_vbus,
+
+ .enable = omap2430_musb_enable,
+ .disable = omap2430_musb_disable,
};
static u64 omap2430_dmamask = DMA_BIT_MASK(32);
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [4/7 v3] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data
[not found] ` <1297857049-27367-4-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
@ 2011-02-16 11:57 ` Sergei Shtylyov
0 siblings, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2011-02-16 11:57 UTC (permalink / raw)
To: Hema HK
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA, Felipe Balbi, Tony Lindgren
On 16-02-2011 14:50, Hema HK wrote:
> From: Kalliguddi, Hema<hemahk-l0cyMroinI0@public.gmane.org>
> Introduce the .phy_suspend function pointer to twl4030_usb_data structure.
> assign the function to it for both sdp board and panda boards.
> This will be used by the twl6030-usb transceiver driver.
> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
> Cc: Felipe Balbi<balbi-l0cyMroinI0@public.gmane.org>
> Cc: Tony Lindgren<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> ---
> arch/arm/mach-omap2/board-4430sdp.c | 1 +
> arch/arm/mach-omap2/board-omap4panda.c | 1 +
> arch/arm/plat-omap/include/plat/usb.h | 1 +
> include/linux/i2c/twl.h | 2 ++
> 4 files changed, 5 insertions(+)
>
> Index: linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-omap2/board-4430sdp.c
> +++ linux-2.6/arch/arm/mach-omap2/board-4430sdp.c
> @@ -272,6 +272,7 @@ static struct twl4030_usb_data omap4_usb
> .phy_exit = omap4430_phy_exit,
> .phy_power = omap4430_phy_power,
> .phy_set_clock = omap4430_phy_set_clk,
> + .phy_suspend = omap4430_phy_suspend,
> };
>
> static struct omap2_hsmmc_info mmc[] = {
> Index: linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
> ===================================================================
> --- linux-2.6.orig/arch/arm/mach-omap2/board-omap4panda.c
> +++ linux-2.6/arch/arm/mach-omap2/board-omap4panda.c
> @@ -153,6 +153,7 @@ static struct twl4030_usb_data omap4_usb
> .phy_exit = omap4430_phy_exit,
> .phy_power = omap4430_phy_power,
> .phy_set_clock = omap4430_phy_set_clk,
> + .phy_suspend = omap4430_phy_suspend,
> };
>
> static struct omap2_hsmmc_info mmc[] = {
> Index: linux-2.6/include/linux/i2c/twl.h
> ===================================================================
> --- linux-2.6.orig/include/linux/i2c/twl.h
> +++ linux-2.6/include/linux/i2c/twl.h
> @@ -600,6 +600,8 @@ struct twl4030_usb_data {
> int (*phy_power)(struct device *dev, int iD, int on);
> /* enable/disable phy clocks */
> int (*phy_set_clock)(struct device *dev, int on);
> + /* suspend/resume of phy */
> + int (*phy_suspend)(struct device *dev, int suspend);
> };
>
> struct twl4030_ins {
You're still doing things backwards. Sigh...
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-16 11:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 11:50 [1/7 v3] usb: otg: enable regulator only on cable/device connect Hema HK
2011-02-16 11:50 ` [3/7 v3] usb: otg: OMAP4430: Introducing suspend function for power management Hema HK
2011-02-16 11:50 ` [4/7 v3] usb: otg: OMAP4430: Add phy_suspend function pointer to twl4030_usb_data Hema HK
[not found] ` <1297857049-27367-4-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 11:57 ` Sergei Shtylyov
2011-02-16 11:50 ` [5/7 v3] usb: otg: TWL6030: Introduce the twl6030_phy_suspend function Hema HK
[not found] ` <1297857049-27367-1-git-send-email-hemahk-l0cyMroinI0@public.gmane.org>
2011-02-16 11:50 ` [2/7 v3] usb: otg: Remove one unnecessary I2C read request Hema HK
2011-02-16 11:50 ` [6/7 v3] usb: otg: TWL6030 Save the last event in otg_transceiver Hema HK
2011-02-16 11:50 ` [7/7 v3] usb: musb: OMAP4430: Fix usb device detection if connected during boot Hema HK
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox