Sorry, I used the other mail in the first answer :-p On Tue, 11 Dec 2007 15:13:03 +0530, "Gadiyar, Anand" <gadiyar@xxxxxx> wrote: > Felipe and others, > >> > Index: linux-omap-2.6-NOV30/drivers/usb/musb/omap2430.c >> > =================================================================== >> > --- linux-omap-2.6-NOV30.orig/drivers/usb/musb/omap2430.c > > <snip> > >> > @@ -40,6 +45,108 @@ >> > #define get_cpu_rev() 2 >> > #endif >> > >> > +#define MUSB_TIMEOUT_A_WAIT_BCON 1100 >> > + >> > +void musb_platform_set_mode(struct musb *musb, u8 musb_mode) >> > +{ >> > +} >> > + >> > +int musb_platform_get_vbus_status(struct musb *musb) >> > +{ >> > + return 0; >> > +} >> >> I'd rather take the two above off and modify musb_core.h (check below) > > Done. I haven't exactly done it the way you suggested. See below. > >> > void musb_platform_enable(struct musb *musb) >> > { >> > @@ -93,6 +200,15 @@ >> > return 0; >> > } >> > >> > +static int omap_set_suspend(struct otg_transceiver *x, int suspend) >> > +{ >> > + if (suspend) >> > + twl4030_phy_suspend(1); >> > + else >> > + twl4030_phy_resume(); >> > + return 0; >> > +} >> >> twl4030_phy_suspend(suspend); >> would look better. You just need to modify twl4030_phy_suspend to work >> as both suspend and resume operations. > > Won't be able to do this. > > twl4030_phy_suspend() takes the argument "int controller_off" > and does things differently depending on the argument. > > Anyway, I think the "would look better" is a matter of taste :) Ok... agreed ;-) > > >> > + >> > int musb_platform_resume(struct musb *musb); >> > >> > int __init musb_platform_init(struct musb *musb) >> > @@ -102,11 +218,13 @@ >> > /* get the clock */ >> > musb->clock = clk_get((struct device *)musb->controller, > "usbhs_ick"); >> > #else >> > - musb->clock = clk_get((struct device *)musb->controller, > "hsusb_ick"); >> > + musb->clock = clk_get((struct device *)musb->controller, >> > + "hsotgusb_ick"); >> >> Why did you break that line here? > > The line length was 81 characters. Is that acceptable? > If it is, then I'll change it back. I didn't want to submit a patch which > failed checkpatch.pl (although that board file patch did have the extern > warning). it's only 1 extra character and the line looks worse when you break it, so leave it with 81 characters. ;-) > > >> > Index: linux-omap-2.6-NOV30/drivers/usb/musb/musb_core.h >> > =================================================================== >> > --- linux-omap-2.6-NOV30.orig/drivers/usb/musb/musb_core.h >> 2007-11-30 >> > 07:16:39.316083032 -0500 >> > +++ linux-omap-2.6-NOV30/drivers/usb/musb/musb_core.h >> 2007-11-30 >> > 07:26:53.085775856 -0500 >> > @@ -476,7 +476,8 @@ >> > >> > extern void musb_hnp_stop(struct musb *musb); >> > >> > -#ifdef CONFIG_USB_TUSB6010 >> > +#if defined(CONFIG_USB_TUSB6010) || \ >> > + defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) >> >> Instead of doing this I'd rather: >> >> @@ -476,12 +476,12 @@ extern void >> musb_platform_disable(struct musb *musb); >> >> extern void musb_hnp_stop(struct musb *musb); >> >> -#ifdef CONFIG_USB_TUSB6010 >> extern void musb_platform_try_idle(struct musb *musb, unsigned long >> timeout); >> + >> +#ifdef CONFIG_USB_TUSB6010 >> extern int musb_platform_get_vbus_status(struct musb *musb); >> extern void musb_platform_set_mode(struct musb *musb, u8 musb_mode); >> #else >> -#define musb_platform_try_idle(x, y) do {} while (0) >> #define musb_platform_get_vbus_status(x) 0 >> #define musb_platform_set_mode(x, y) do {} while (0) >> #endif >> > > I wouldn’t do it exactly this way, because musb_platform_try_idle is not > defined > for Davinci and other architectures. Instead, I've done this. What say? > > extern void musb_hnp_stop(struct musb *musb); > > -#ifdef CONFIG_USB_TUSB6010 > +#if defined(CONFIG_USB_TUSB6010) || \ > + defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) > extern void musb_platform_try_idle(struct musb *musb, unsigned long > timeout); > +#else > +#define musb_platform_try_idle(x, y) do {} while (0) > +#endif > + > +#ifdef CONFIG_USB_TUSB6010 > extern int musb_platform_get_vbus_status(struct musb *musb); > extern void musb_platform_set_mode(struct musb *musb, u8 musb_mode); > #else > -#define musb_platform_try_idle(x, y) do {} while (0) > #define musb_platform_get_vbus_status(x) 0 > #define musb_platform_set_mode(x, y) do {} while (0) > #endif This looks ok ;-) Acked-by: Felipe Balbi <felipe.lima@xxxxxxxxxxx> -- Best Regards, Felipe Balbi http://felipebalbi.com me@xxxxxxxxxxxxxxx - To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html