linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Aaro Koskinen <aaro.koskinen-X3B1VOXEql0@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH 2/3] USB: OMAP: add omap-otg
Date: Wed, 12 Jun 2013 18:13:26 +0300	[thread overview]
Message-ID: <20130612151326.GE15056@arwen.pp.htv.fi> (raw)
In-Reply-To: <1370817606-1008-3-git-send-email-aaro.koskinen-X3B1VOXEql0@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

Hi,

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.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-06-12 15:13 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 [this message]
2013-06-13 22:37       ` Aaro Koskinen
     [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=20130612151326.GE15056@arwen.pp.htv.fi \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=aaro.koskinen-X3B1VOXEql0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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).