Re: [PATCHv3 1/2] usb: USB Type-C connector class
From: Heikki Krogerus
Date: Thu Jun 23 2016 - 09:11:39 EST
On Thu, Jun 23, 2016 at 03:25:46PM +0300, Roger Quadros wrote:
> Hi,
>
> On 23/06/16 15:00, Heikki Krogerus wrote:
> > Hi Oliver,
> >
> > On Thu, Jun 23, 2016 at 10:38:58AM +0200, Oliver Neukum wrote:
> >> 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.
> >
> > Which is a fact that we can do nothing about. The role after
> > connection with DRP ports will be dictated by the partner or selected
> > randomly in case the partner is also DRP. We can prefer a role, but
> > that in the end guarantees nothing. So if the role that we end up with
> > after connection (seen in current_data_role) does not satisfy us, all
> > we can do is try to swap it.
> >
> > I'm not sure what is your point here.
>
> What if the application wants to know exactly what role the device is
> operating in at the current moment?
>
> We need to have 2 distinct parameters.
>
> 1) supported_modes : host, device, host or device
> 2) current_mode: host, device, disconnected
And we already do. But that is not the topic of this thread. Oliver I
believe feels that we are not presenting all the capabilities of the
ports.
Cheers,
--
heikki