linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@iki.fi>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Tony Lindgren <tony@atomide.com>
Subject: Re: [PATCH 2/3] USB: OMAP: add omap-otg
Date: Fri, 14 Jun 2013 01:37:11 +0300	[thread overview]
Message-ID: <20130613223711.GD18360@blackmetal.musicnaut.iki.fi> (raw)
In-Reply-To: <20130612151326.GE15056@arwen.pp.htv.fi>

Hi,

On Wed, Jun 12, 2013 at 06:13:26PM +0300, Felipe Balbi wrote:
> On Mon, Jun 10, 2013 at 01:40:05AM +0300, Aaro Koskinen wrote:
> > +void omap_otg_set_mode(enum omap_otg_mode mode)
> > +{
> > +	if (!otg_dev) {
> > +		WARN(1, "%s: controller not present\n", __func__);
> > +		return;
> > +	}
> > +	mutex_lock(&otg_dev->serialize);
> > +	switch (mode) {
> > +	case OMAP_OTG_MODE_DEVICE:
> > +		/*
> > +		 * Set B-session valid.
> > +		 */
> > +		omap_otg_ctrl(OMAP_OTG_ID | OMAP_OTG_BSESSVLD);
> > +		break;
> > +	case OMAP_OTG_MODE_HOST:
> > +		/*
> > +		 * Set A-session valid.
> > +		 */
> > +		omap_otg_ctrl(OMAP_OTG_ASESSVLD);
> > +		break;
> > +	case OMAP_OTG_MODE_DISCONNECT:
> > +		/*
> > +		 * Set B-session end to indicate no VBUS.
> > +		 */
> > +		omap_otg_ctrl(OMAP_OTG_ID | OMAP_OTG_BSESSEND);
> > +		break;
> > +	default:
> > +		WARN(1, "%s: unknown mode: %d\n", __func__, mode);
> > +	}
> > +	mutex_unlock(&otg_dev->serialize);
> > +}
> > +EXPORT_SYMBOL_GPL(omap_otg_set_mode);
> 
> looks like this should provide a extcon interface for its users.

Is there any examples available? Anyway, I'll look into this.

Thanks,

A.

  reply	other threads:[~2013-06-13 22:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-09 22:40 [PATCH 0/3] USB: OMAP: Tahvo USB support for 770 Aaro Koskinen
2013-06-09 22:40 ` [PATCH 1/3] ARM: OMAP1: nokia770: enable Tahvo Aaro Koskinen
2013-06-09 22:40 ` [PATCH 2/3] USB: OMAP: add omap-otg Aaro Koskinen
     [not found]   ` <1370817606-1008-3-git-send-email-aaro.koskinen-X3B1VOXEql0@public.gmane.org>
2013-06-12 15:13     ` Felipe Balbi
2013-06-13 22:37       ` Aaro Koskinen [this message]
     [not found]         ` <20130613223711.GD18360-R3WNPi76c83LsdW6vOPryG4HOFkwEHDbMR2xtNvyitY@public.gmane.org>
2013-06-14  1:27           ` Felipe Balbi
2013-06-09 22:40 ` [PATCH 3/3] USB: OMAP: Tahvo USB transceiver driver Aaro Koskinen

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=20130613223711.GD18360@blackmetal.musicnaut.iki.fi \
    --to=aaro.koskinen@iki.fi \
    --cc=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tony@atomide.com \
    --subject='Re: [PATCH 2/3] USB: OMAP: add omap-otg' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox