linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: OMAP2+: Fix MUSB ifdefs for platform init code
Date: Mon, 25 Jun 2012 03:47:20 -0700	[thread overview]
Message-ID: <20120625104720.GC12766@atomide.com> (raw)
In-Reply-To: <20120622101533.GC28472@arwen.pp.htv.fi>

* Felipe Balbi <balbi@ti.com> [120622 03:22]:
> On Wed, Jun 13, 2012 at 03:15:06AM -0700, Tony Lindgren wrote:
> > Commit 62285963 (usb: musb: drop a gigantic amount of ifdeferry)
> > got rid of a bunch of ifdefs in the MUSB code. Looks like the
> > platform init code is still using these dropped defines though,
> > which in many cases results the board defaulting always to host
> > mode.
> > 
> > Currently the situation is that USB_MUSB_HDRC is the main
> > Kconfig option with additional USB_GADGET_MUSB_HDRC so only
> > these two should be used to select between host and OTG mode.
> > 
> > Fix the situation for omaps. The following users should fix the
> > platform init code in a similar way:
> > 
> > Dropped Kconfig option          Current users
> > 
> > USB_MUSB_OTG                    blackfin, davinci, not in Kconfigs
> > USB_MUSB_PERIPHERAL             davinci, not in Kconfigs
> > USB_MUSB_HOST                   davinci, not in Kconfigs
> > USB_MUSB_HDRC_HCD               blackfin, not in Kconfigs
> > USB_MUSB_OTG                    blackfin, not in Kconfigs
> > 
> > Cc: Mike Frysinger <vapier@gentoo.org>
> > Cc: Sekhar Nori <nsekhar@ti.com>
> > Cc: linux-usb at vger.kernel.org
> > Cc: Felipe Balbi <balbi@ti.com>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> Looks ok, though I would stick to things boards are wired to do. e.g.:
> 
> all development boards are wired for OTG (with a few exceptions),
> n800 is peripheral only
> n810 is OTG
> 
> and so on. That way you remove all the clutter.

FYI, these got already merged last week as fixes because of the
broken Kconfig options.

What you're suggesting sounds like a good follow-up patch to improve
things, although I suggest that we remove CONFIG_USB_GADGET_MUSB_HDRC
ifdef else from board-*.c files, and always set host = MUSB_OTG.

For example, both n800 and n810 are wired up the same way except for
the mini-B vs mini-AB connector. The connector alone should be enough
to keep n800 as peripheral unless somebody specifically wants to force
it into host mode by using a non-standard cable or the debug options.

AFAIK, this same logic should apply to all the devices, or do you
see issues with it?

Regards,

Tony

  reply	other threads:[~2012-06-25 10:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 10:15 [PATCH 0/2] Few MUSB fixes for ifdef removal Tony Lindgren
2012-06-13 10:15 ` [PATCH 1/2] ARM: OMAP2+: Fix MUSB ifdefs for platform init code Tony Lindgren
2012-06-22 10:15   ` Felipe Balbi
2012-06-25 10:47     ` Tony Lindgren [this message]
2012-06-25 10:53       ` Felipe Balbi
2012-06-13 10:15 ` [PATCH 2/2] ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0 Tony Lindgren
2012-06-25  9:38   ` 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=20120625104720.GC12766@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).