From: Felipe Balbi <balbi@ti.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: balbi@ti.com, linux-omap@vger.kernel.org, archit@ti.com,
tony@atomide.com, adrian.hunter@nokia.com
Subject: Re: [PATCH] arm: omap3beagle: init musb default role by Kconfig
Date: Wed, 16 Feb 2011 10:05:06 +0200 [thread overview]
Message-ID: <20110216080506.GC2497@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <AANLkTik-tZKZ-0G1RBXD0rz1O4=wLXtHd2wTD-61dLm0@mail.gmail.com>
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@ti.com> 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:
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) {
--
balbi
next prev parent reply other threads:[~2011-02-16 8:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-15 8:55 [PATCH] arm: omap3beagle: init musb default role by Kconfig Bob Liu
2011-02-15 11:23 ` Felipe Balbi
2011-02-16 2:07 ` Bob Liu
2011-02-16 8:05 ` Felipe Balbi [this message]
2011-02-16 8:49 ` Bob Liu
2011-02-16 9:02 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110216080506.GC2497@legolas.emea.dhcp.ti.com \
--to=balbi@ti.com \
--cc=adrian.hunter@nokia.com \
--cc=archit@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=lliubbo@gmail.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox