From: Guenter Roeck <linux@roeck-us.net>
To: Oliver Neukum <oneukum@suse.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Rajaram R <rajaram.officemail@gmail.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [RFC PATCHv2] usb: USB Type-C Connector Class
Date: Mon, 23 May 2016 06:27:25 -0700 [thread overview]
Message-ID: <5743053D.5060307@roeck-us.net> (raw)
In-Reply-To: <1463981641.12181.5.camel@suse.com>
On 05/22/2016 10:34 PM, Oliver Neukum wrote:
> On Sun, 2016-05-22 at 08:54 -0700, Guenter Roeck wrote:
>> Hi Oliver,
>>
>> On 05/20/2016 11:43 PM, Oliver Neukum wrote:
>>> On Fri, 2016-05-20 at 22:51 -0700, Guenter Roeck wrote:
>>>> On 05/20/2016 06:37 AM, Oliver Neukum wrote:
>>>>> On Fri, 2016-05-20 at 14:24 +0300, Heikki Krogerus wrote:
>>>>>> On Thu, May 19, 2016 at 04:47:17PM +0200, Oliver Neukum wrote:
>>>>>>>
>>>>>>> Please explain. How does that express DRP but prefered master?
>>>>>>
>>>>>> Sorry but I'm not sure what you mean here. If the port is capable of
>>>>>> being used as dual role port (DRP in the supported_data_roles file),
>>>>>> that is the only case where you can select the role with this file. So
>>>>>> I would imagine that in your case you want to make the port act as
>>>>>> DFP only, right? But if the port is capable of acting only as UFP, you
>>>>>> are stuck with that role.
>>>>>
>>>>> How do I trigger that Try.SRC is to be used on a port?
>>>>>
>>>>
>>>> This would be part of the USB PD protocol, ie probably outside the scope
>>>> of the class code. In my implementation, I enable Try.SRC or Try.SNK based
>>>> on the platform's preferred role.
>>>
>>> Hi,
>>>
>>> from a purely formal point of view that makes sense.
>>>
>>> >From a usability viewpoint I'd ideally want all controls
>>> for role at one place. And possibly the controls for modes
>>> at the same place.
>>>
>>> I think part of the problem here is that we lack a statement
>>> of mission. What are these controls for?
>>> Merely for controlling modes and providing information
>>> about modes? And to use neutral terms only for the "master"
>>> side or both sides?
>>>
>>
>> Good question. I originally added a sysfs attribute 'preferred-mode' to
>> my code, but then concluded that this is supposed to be provided
>> by the platform and added it as platform data instead, with (currently)
>> no means to report it to user space.
>
> Mode or role? I would say that the choice of alternate modes belongs to
s/preferred mode/preferred role/g
> user space. THere's no point in giving a preference to the kernel.
> Role is different. Try.SRC is part of the standard (and Try.SNK has been
> added). It needs to be in kernel space.
>
> Now, if you say that this API is for selecting modes only, then I say it
> lacks support for cable resets and notifications thereof. Yes, that is a
> PD feature, but that doesn't help us. It changes the mode.
>
>> Heikki's current code doesn't really match the semantics of a 'preferred'
>> mode, at least not as I read it. In my understanding, 'preferred mode'
>> means "this is a DRP port which prefers to be a source/sink". In Heikki's
>> code, one can fix the mode to source or sink, but that doesn't support
>> situations such as "this port prefers to be a source, but is currently
>> a sink because the link partner happens to be a charger or refuses to act
>> as sink for some other reason".
>
> Yes. That is why we need a mission statement. We may be talking
> a rice cooker not preparing tea here.
>
>> Given that, my working assumption is that preferred mode handling is supposed
>> to be outside the scope of the infrastructure. I am happy to be corrected,
>> though.
>>
>> On a side note, are you working on a USB-PD implementation as well ?
>
> No, one of my task is to to make use of USB PD (and alternate modes)
> in a distribution.
>
> Regards
> Oliver
>
>
>
next prev parent reply other threads:[~2016-05-23 13:27 UTC|newest]
Thread overview: 98+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 12:44 Heikki Krogerus
2016-05-19 14:47 ` Oliver Neukum
2016-05-20 11:24 ` Heikki Krogerus
2016-05-20 13:37 ` Oliver Neukum
2016-05-21 5:51 ` Guenter Roeck
2016-05-21 6:43 ` Oliver Neukum
2016-05-22 15:54 ` Guenter Roeck
2016-05-23 5:34 ` Oliver Neukum
2016-05-23 13:27 ` Guenter Roeck [this message]
2016-05-23 13:58 ` Oliver Neukum
2016-05-23 14:43 ` Guenter Roeck
2016-05-23 15:55 ` Oliver Neukum
2016-05-23 16:52 ` Guenter Roeck
2016-05-24 10:08 ` Heikki Krogerus
2016-05-24 10:18 ` Oliver Neukum
2016-05-24 11:04 ` Heikki Krogerus
2016-05-19 14:48 ` Oliver Neukum
2016-05-19 15:43 ` Greg KH
2016-05-20 10:58 ` Heikki Krogerus
2016-05-19 17:53 ` Guenter Roeck
2016-05-20 10:47 ` Heikki Krogerus
2016-05-20 17:02 ` Guenter Roeck
2016-05-23 9:23 ` Heikki Krogerus
2016-05-20 14:19 ` Oliver Neukum
2016-05-23 9:57 ` Heikki Krogerus
2016-05-23 11:25 ` Oliver Neukum
2016-05-23 17:09 ` Guenter Roeck
2016-05-24 9:06 ` Oliver Neukum
2016-05-24 9:32 ` Heikki Krogerus
2016-05-24 12:51 ` Oliver Neukum
2016-05-25 11:28 ` Heikki Krogerus
2016-05-25 15:19 ` Guenter Roeck
2016-05-27 7:30 ` Heikki Krogerus
2016-05-24 13:42 ` Guenter Roeck
2016-05-25 11:30 ` Heikki Krogerus
2016-05-25 13:12 ` Guenter Roeck
2016-05-24 19:28 ` Guenter Roeck
2016-05-25 11:51 ` Heikki Krogerus
2016-05-25 13:21 ` Guenter Roeck
2016-05-25 14:04 ` Heikki Krogerus
2016-05-25 14:20 ` Oliver Neukum
2016-05-25 14:59 ` Guenter Roeck
2016-05-27 7:29 ` Heikki Krogerus
2016-05-25 18:35 ` [RFC PATCH] usb: typec: Various API updates and fixes Guenter Roeck
2016-05-27 7:55 ` Heikki Krogerus
2016-05-27 14:06 ` Guenter Roeck
2016-05-30 12:48 ` Heikki Krogerus
2016-05-30 13:19 ` [RFC PATCHv2] usb: USB Type-C Connector Class Heikki Krogerus
2016-05-30 13:59 ` Oliver Neukum
2016-05-31 8:31 ` Heikki Krogerus
2016-05-31 8:48 ` Oliver Neukum
2016-05-31 12:09 ` Heikki Krogerus
2016-05-31 12:43 ` Heikki Krogerus
2016-05-31 17:20 ` Guenter Roeck
2016-06-01 8:23 ` Heikki Krogerus
2016-06-01 8:31 ` Oliver Neukum
2016-06-01 9:04 ` Oliver Neukum
2016-06-01 13:34 ` Guenter Roeck
2016-06-02 6:24 ` Oliver Neukum
2016-06-02 6:37 ` Guenter Roeck
2016-06-02 7:43 ` Oliver Neukum
2016-05-31 17:14 ` Guenter Roeck
2016-06-01 9:26 ` Oliver Neukum
2016-06-01 23:29 ` Guenter Roeck
2016-06-02 6:30 ` Oliver Neukum
2016-06-02 8:27 ` Heikki Krogerus
2016-06-02 10:18 ` Heikki Krogerus
2016-06-02 16:12 ` Guenter Roeck
2016-06-03 13:21 ` Heikki Krogerus
2016-06-03 13:51 ` Guenter Roeck
2016-06-03 15:17 ` Heikki Krogerus
2016-06-03 18:39 ` Guenter Roeck
2016-06-06 13:28 ` Heikki Krogerus
2016-06-06 13:35 ` Oliver Neukum
2016-06-07 8:23 ` Heikki Krogerus
2016-06-07 16:57 ` Guenter Roeck
2016-06-02 8:02 ` Heikki Krogerus
2016-06-03 20:20 ` Pavel Machek
2016-06-06 13:45 ` Heikki Krogerus
2016-06-06 14:41 ` Greg KH
2016-06-07 8:25 ` Heikki Krogerus
2016-06-06 16:02 ` Guenter Roeck
2016-06-10 14:34 ` [RFC PATCHv3] " Heikki Krogerus
2016-06-11 7:05 ` Oliver Neukum
2016-06-11 18:03 ` Guenter Roeck
2016-06-13 7:49 ` Heikki Krogerus
2016-06-13 7:48 ` Heikki Krogerus
2016-06-21 13:08 ` [RFC PATCHv2] " Oliver Neukum
2016-06-21 13:24 ` Guenter Roeck
2016-06-21 19:43 ` Oliver Neukum
2016-06-21 21:37 ` Guenter Roeck
2016-06-21 13:58 ` Heikki Krogerus
2016-06-21 20:43 ` Oliver Neukum
2016-06-22 9:31 ` Heikki Krogerus
2016-06-22 10:08 ` Oliver Neukum
2016-06-22 11:19 ` Heikki Krogerus
2016-08-07 21:37 ` Pavel Machek
2016-08-08 8:52 ` Oliver Neukum
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=5743053D.5060307@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andy.shevchenko@gmail.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=mathias.nyman@linux.intel.com \
--cc=oneukum@suse.com \
--cc=rajaram.officemail@gmail.com \
/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
Powered by JetHome