On Wed, Feb 16, 2011 at 4:05 PM, Felipe Balbi <balbi@xxxxxx> wrote: > On Wed, Feb 16, 2011 at 10:07:26AM +0800, Bob Liu wrote: >> On Tue, Feb 15, 2011 at 7:23 PM, Felipe Balbi <balbi@xxxxxx> wrote: >> > Hi, >> > >> > On Tue, Feb 15, 2011 at 04:55:00PM +0800, Bob Liu wrote: >> >> Currently musb is initialized to OTG mode by default in musb_board_data, it's >> >> better to init it depending on Kconfig. >> > >> > what's the problem in always keeping OTG ? that board is wired for OTG >> > anyway. >> > >> >> Yeah, but it's better if user can make their choices by themselves. >> Or mask the other choices in Kconfig if keeping OTG. >> Currently user can select HOST-only mode in Kconfig, but will receive >> compiler error. >> In my opinion, this should be consist. > > compile error ?? Would you share that ? All I see is a dev_err() when > Kconfig doesn't match board-file. > >> Another problem is if keeping in OTG mode, my board can't recognize usb device. >> HOST-only mode works fine, I am still debugging on it. >> But I think it's not related with current topic. > > I can be related. Try this: Yeah, it works. Thanks, sorry for the noise . BTW: Is the below patch which about musb_core.c will be merged into mainline ? > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > index 54a8bd1..bc29655 100644 > --- a/drivers/usb/musb/musb_core.c > +++ b/drivers/usb/musb/musb_core.c > @@ -1949,31 +1949,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) > Â Â Â Â Â Â Â Âgoto fail0; > Â Â Â Â} > > - Â Â Â switch (plat->mode) { > - Â Â Â case MUSB_HOST: > -#ifdef CONFIG_USB_MUSB_HDRC_HCD > - Â Â Â Â Â Â Â break; > -#else > - Â Â Â Â Â Â Â goto bad_config; > -#endif > - Â Â Â case MUSB_PERIPHERAL: > -#ifdef CONFIG_USB_GADGET_MUSB_HDRC > - Â Â Â Â Â Â Â break; > -#else > - Â Â Â Â Â Â Â goto bad_config; > -#endif > - Â Â Â case MUSB_OTG: > -#ifdef CONFIG_USB_MUSB_OTG > - Â Â Â Â Â Â Â break; > -#else > -bad_config: > -#endif > - Â Â Â default: > - Â Â Â Â Â Â Â dev_err(dev, "incompatible Kconfig role setting\n"); > - Â Â Â Â Â Â Â status = -EINVAL; > - Â Â Â Â Â Â Â goto fail0; > - Â Â Â } > - > Â Â Â Â/* allocate */ > Â Â Â Âmusb = allocate_instance(dev, plat->config, ctrl); > Â Â Â Âif (!musb) { > -- Regards, --Bob -- 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