All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCHv3 1/2] usb: USB Type-C connector class
Date: Thu, 23 Jun 2016 10:38:58 +0200	[thread overview]
Message-ID: <1466671138.2556.5.camel@suse.com> (raw)
In-Reply-To: <20160623082307.GA27263@kuha.fi.intel.com>

On Thu, 2016-06-23 at 11:23 +0300, Heikki Krogerus wrote:
> On Wed, Jun 22, 2016 at 06:44:18PM +0200, Oliver Neukum wrote:

> No it's not. DRP means a port that can operate as _either_ Source
> (host) or Sink (device), but not at the same time..

Yes, but it is unclear what you will be after a connection
and that's the point.

> > And you can be able to become a host and be able to become a device.
> > But not at the same time. These ports are switchable.
> > 
> > The current API cannot express the difference.
> 
> I think you have misunderstood something. The only case where the port
> can be dual-role is if it's set to be DRP. Otherwise it's Source only
> OR Sink only.
> 
> The "Role Supported" bits only tell us how we can program for example
> the ROLE_CONTROL registers. I guess the "Roles Supported" bits in
> DEVICE_CAPABILITIES are not explained properly, so let's go over them
> here:
> 
> 000b = Source _or_ Sink only
> 001b = Source only
> 010b = Sink only
> 011b = Sink only with support for autonomously detected accessory modes
> 100b = DRP only, and this I believe mean we can not program the port
>         to be Sink only or Source only

I think so, too.

> 101b = Source only OR Sink only OR DRP, plus ability to detect
>         accessories and I guess also cables autonomously
> 110b = Source only OR Sink only OR DRP
> 
> So where the spec lists "Source, Sink", it actually should have said
> "Source only OR Sink only".
> 
> But you still have only the following options for a port:
> 1) Source only (host)
> 2) Sink only (device)
> 3) DRP (device, host)

Yes, so you can map "000b = Source _or_ Sink only" to host or device
depending on the current setting. But then you lose the information
that it can be changed. It either will look like "001b" or "010b".
So we throw away information.

And you map "100b = DRP only" and "101b" and "110b" to host, device
which again drops information.

	Regards
		Oliver

  reply	other threads:[~2016-06-23  8:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 14:51 [PATCHv3 0/2] USB Type-C Connector class Heikki Krogerus
2016-06-21 14:51 ` [PATCHv3 1/2] usb: USB Type-C connector class Heikki Krogerus
2016-06-21 20:25   ` Oliver Neukum
2016-06-22  9:50     ` Heikki Krogerus
2016-06-22 10:03       ` Heikki Krogerus
2016-06-22 10:21         ` Oliver Neukum
2016-06-22 10:14       ` Oliver Neukum
2016-06-22 11:44         ` Heikki Krogerus
2016-06-22 13:47           ` Oliver Neukum
2016-06-22 14:38             ` Heikki Krogerus
2016-06-22 16:44               ` Oliver Neukum
2016-06-23  8:23                 ` Heikki Krogerus
2016-06-23  8:38                   ` Oliver Neukum [this message]
2016-06-23 12:00                     ` Heikki Krogerus
2016-06-23 12:25                       ` Roger Quadros
2016-06-23 13:11                         ` Heikki Krogerus
2016-06-23 13:29                       ` Guenter Roeck
2016-06-22 21:54   ` Guenter Roeck
2016-06-23  8:25     ` Heikki Krogerus
2016-06-23 11:53   ` Roger Quadros
2016-06-23 13:08     ` Heikki Krogerus
     [not found]   ` <CAOiXhaKhPfY0Bz8TsZMFQsgLHZZ01DwZ=TPcXtH2nYvHx3PqVA@mail.gmail.com>
     [not found]     ` <20160627095120.GC20801@kuha.fi.intel.com>
     [not found]       ` <CAOiXhaJiche=jGbg_C2Jbmw1BnA5UYVNKOfhmy4CFiugoPV_+w@mail.gmail.com>
2016-06-27 12:13         ` Heikki Krogerus
2016-06-27 13:39           ` Guenter Roeck
2016-06-28 13:12             ` Heikki Krogerus
2016-06-28 13:28               ` Guenter Roeck
2016-06-29  8:51           ` Rajaram R
2016-06-29 10:30             ` Heikki Krogerus
2016-06-29 10:51               ` Rajaram R
2016-06-29 11:27                 ` Heikki Krogerus
2016-07-04  8:55                   ` Oliver Neukum
2016-06-21 14:51 ` [PATCHv3 2/2] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY Heikki Krogerus
2016-06-21 22:25 ` [PATCHv3 0/2] USB Type-C Connector class Guenter Roeck
2016-06-22  9:51   ` Heikki Krogerus
2016-06-22 13:24     ` Guenter Roeck

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=1466671138.2556.5.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.