Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-08-08 Thread Oliver Neukum
On Sun, 2016-08-07 at 23:37 +0200, Pavel Machek wrote: > Hi! > > > > With these boards, you will not see anything on the screen that is > > > attached to a Type-C connector until the OS has booted to the point > > > where it has negotiated the power contract and entered a mode. > > > > > > If

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-08-08 Thread Oliver Neukum
On Sun, 2016-08-07 at 23:37 +0200, Pavel Machek wrote: > Hi! > > > > With these boards, you will not see anything on the screen that is > > > attached to a Type-C connector until the OS has booted to the point > > > where it has negotiated the power contract and entered a mode. > > > > > > If

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-08-07 Thread Pavel Machek
Hi! > > With these boards, you will not see anything on the screen that is > > attached to a Type-C connector until the OS has booted to the point > > where it has negotiated the power contract and entered a mode. > > > > If the system has BIOS/FW/EC capable of negotiating the power contract > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-08-07 Thread Pavel Machek
Hi! > > With these boards, you will not see anything on the screen that is > > attached to a Type-C connector until the OS has booted to the point > > where it has negotiated the power contract and entered a mode. > > > > If the system has BIOS/FW/EC capable of negotiating the power contract > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Heikki Krogerus
On Wed, Jun 22, 2016 at 12:08:57PM +0200, Oliver Neukum wrote: > On Wed, 2016-06-22 at 12:31 +0300, Heikki Krogerus wrote: > > Hi, > > > > Now correct me, if I am misreading the spec. I am sure the system > > > will boot unless it needs ridiculous amounts of power, but > > > will we see anything

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Heikki Krogerus
On Wed, Jun 22, 2016 at 12:08:57PM +0200, Oliver Neukum wrote: > On Wed, 2016-06-22 at 12:31 +0300, Heikki Krogerus wrote: > > Hi, > > > > Now correct me, if I am misreading the spec. I am sure the system > > > will boot unless it needs ridiculous amounts of power, but > > > will we see anything

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Oliver Neukum
On Wed, 2016-06-22 at 12:31 +0300, Heikki Krogerus wrote: Hi, > > Now correct me, if I am misreading the spec. I am sure the system > > will boot unless it needs ridiculous amounts of power, but > > will we see anything on the screen? As far as I can tell the spec > > actually says that you

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Oliver Neukum
On Wed, 2016-06-22 at 12:31 +0300, Heikki Krogerus wrote: Hi, > > Now correct me, if I am misreading the spec. I am sure the system > > will boot unless it needs ridiculous amounts of power, but > > will we see anything on the screen? As far as I can tell the spec > > actually says that you

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Heikki Krogerus
Hi Oliver, On Tue, Jun 21, 2016 at 10:43:05PM +0200, Oliver Neukum wrote: > On Tue, 2016-06-21 at 16:58 +0300, Heikki Krogerus wrote: > > On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > > > > > The firmware will surely want to display something. So it is possible > > > that we

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-22 Thread Heikki Krogerus
Hi Oliver, On Tue, Jun 21, 2016 at 10:43:05PM +0200, Oliver Neukum wrote: > On Tue, 2016-06-21 at 16:58 +0300, Heikki Krogerus wrote: > > On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > > > > > The firmware will surely want to display something. So it is possible > > > that we

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Guenter Roeck
On Tue, Jun 21, 2016 at 09:43:20PM +0200, Oliver Neukum wrote: > On Tue, 2016-06-21 at 06:24 -0700, Guenter Roeck wrote: > > On 06/21/2016 06:08 AM, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > >> The purpose of this class is to provide unified interface

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Guenter Roeck
On Tue, Jun 21, 2016 at 09:43:20PM +0200, Oliver Neukum wrote: > On Tue, 2016-06-21 at 06:24 -0700, Guenter Roeck wrote: > > On 06/21/2016 06:08 AM, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > >> The purpose of this class is to provide unified interface

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Tue, 2016-06-21 at 16:58 +0300, Heikki Krogerus wrote: > On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > > > The firmware will surely want to display something. So it is possible > > that we start the OS will a valid power contract. How do we deal > > with that? Renegotiate?

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Tue, 2016-06-21 at 16:58 +0300, Heikki Krogerus wrote: > On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > > > The firmware will surely want to display something. So it is possible > > that we start the OS will a valid power contract. How do we deal > > with that? Renegotiate?

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Tue, 2016-06-21 at 06:24 -0700, Guenter Roeck wrote: > On 06/21/2016 06:08 AM, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > >> The purpose of this class is to provide unified interface for user > >> space to get the status and basic information about USB

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Tue, 2016-06-21 at 06:24 -0700, Guenter Roeck wrote: > On 06/21/2016 06:08 AM, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > >> The purpose of this class is to provide unified interface for user > >> space to get the status and basic information about USB

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Heikki Krogerus
On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > The purpose of this class is to provide unified interface for user > > space to get the status and basic information about USB Type-C > > Connectors in the system, control

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Heikki Krogerus
On Tue, Jun 21, 2016 at 03:08:52PM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > The purpose of this class is to provide unified interface for user > > space to get the status and basic information about USB Type-C > > Connectors in the system, control

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > The purpose of this class is to provide unified interface for user > space to get the status and basic information about USB Type-C > Connectors in the system, control data role swapping, and when USB PD > is available, also power role

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Oliver Neukum
On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > The purpose of this class is to provide unified interface for user > space to get the status and basic information about USB Type-C > Connectors in the system, control data role swapping, and when USB PD > is available, also power role

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Guenter Roeck
On 06/21/2016 06:08 AM, Oliver Neukum wrote: On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: The purpose of this class is to provide unified interface for user space to get the status and basic information about USB Type-C Connectors in the system, control data role swapping, and when

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-21 Thread Guenter Roeck
On 06/21/2016 06:08 AM, Oliver Neukum wrote: On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: The purpose of this class is to provide unified interface for user space to get the status and basic information about USB Type-C Connectors in the system, control data role swapping, and when

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Guenter Roeck
On Mon, Jun 06, 2016 at 04:28:08PM +0300, Heikki Krogerus wrote: [ ... ] > > I would prefer lower case letters. I don't know the SIDs there are at > them moment, other then Display Port. Do you know them? > SIDs: 0xff00 - power delivery 0xff01 - displayport 0xff02 - MHL

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Guenter Roeck
On Mon, Jun 06, 2016 at 04:28:08PM +0300, Heikki Krogerus wrote: [ ... ] > > I would prefer lower case letters. I don't know the SIDs there are at > them moment, other then Display Port. Do you know them? > SIDs: 0xff00 - power delivery 0xff01 - displayport 0xff02 - MHL

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Heikki Krogerus
On Mon, Jun 06, 2016 at 07:41:28AM -0700, Greg KH wrote: > On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > > > For consistency, should this be either type-c/type-c.c or > > > typec/typec.c? > > > > For some reason I like to have the dash in the folder name, but I > > don't like

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Heikki Krogerus
On Mon, Jun 06, 2016 at 07:41:28AM -0700, Greg KH wrote: > On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > > > For consistency, should this be either type-c/type-c.c or > > > typec/typec.c? > > > > For some reason I like to have the dash in the folder name, but I > > don't like

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Heikki Krogerus
On Mon, Jun 06, 2016 at 03:35:35PM +0200, Oliver Neukum wrote: > On Mon, 2016-06-06 at 16:28 +0300, Heikki Krogerus wrote: > > > I would prefer lower case letters. I don't know the SIDs there are at > > them moment, other then Display Port. Do you know them? > > > > I don't think we can ever

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-07 Thread Heikki Krogerus
On Mon, Jun 06, 2016 at 03:35:35PM +0200, Oliver Neukum wrote: > On Mon, 2016-06-06 at 16:28 +0300, Heikki Krogerus wrote: > > > I would prefer lower case letters. I don't know the SIDs there are at > > them moment, other then Display Port. Do you know them? > > > > I don't think we can ever

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Guenter Roeck
On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > Hi, > > On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > > The purpose of this class is to provide unified interface for user > > > space to get the status

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Guenter Roeck
On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > Hi, > > On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > > The purpose of this class is to provide unified interface for user > > > space to get the status

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Greg KH
On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > Hi, > > On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > > The purpose of this class is to provide unified interface for user > > > space to get the status

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Greg KH
On Mon, Jun 06, 2016 at 04:45:09PM +0300, Heikki Krogerus wrote: > Hi, > > On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > > The purpose of this class is to provide unified interface for user > > > space to get the status

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Heikki Krogerus
Hi, On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > The purpose of this class is to provide unified interface for user > > space to get the status and basic information about USB Type-C > > Connectors in the system, control

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Heikki Krogerus
Hi, On Fri, Jun 03, 2016 at 10:20:01PM +0200, Pavel Machek wrote: > On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > > The purpose of this class is to provide unified interface for user > > space to get the status and basic information about USB Type-C > > Connectors in the system, control

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Oliver Neukum
On Mon, 2016-06-06 at 16:28 +0300, Heikki Krogerus wrote: > I would prefer lower case letters. I don't know the SIDs there are at > them moment, other then Display Port. Do you know them? > > I don't think we can ever guarantee that in every case we will be able > to provide a human readable

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Oliver Neukum
On Mon, 2016-06-06 at 16:28 +0300, Heikki Krogerus wrote: > I would prefer lower case letters. I don't know the SIDs there are at > them moment, other then Display Port. Do you know them? > > I don't think we can ever guarantee that in every case we will be able > to provide a human readable

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Heikki Krogerus
On Fri, Jun 03, 2016 at 11:39:27AM -0700, Guenter Roeck wrote: > On Fri, Jun 03, 2016 at 06:17:46PM +0300, Heikki Krogerus wrote: > [ ... ] > > > > > > > > > > In my test case, this gives me > > > > > /sys/class/type-c/usbc0/ > > > > > usbc0.svid:18d1 > > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-06 Thread Heikki Krogerus
On Fri, Jun 03, 2016 at 11:39:27AM -0700, Guenter Roeck wrote: > On Fri, Jun 03, 2016 at 06:17:46PM +0300, Heikki Krogerus wrote: > [ ... ] > > > > > > > > > > In my test case, this gives me > > > > > /sys/class/type-c/usbc0/ > > > > > usbc0.svid:18d1 > > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Pavel Machek
On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > The purpose of this class is to provide unified interface for user > space to get the status and basic information about USB Type-C > Connectors in the system, control data role swapping, and when USB PD > is available, also power role swapping

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Pavel Machek
On Thu 2016-05-19 15:44:54, Heikki Krogerus wrote: > The purpose of this class is to provide unified interface for user > space to get the status and basic information about USB Type-C > Connectors in the system, control data role swapping, and when USB PD > is available, also power role swapping

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Guenter Roeck
On Fri, Jun 03, 2016 at 06:17:46PM +0300, Heikki Krogerus wrote: [ ... ] > > > > > > > > In my test case, this gives me > > > > /sys/class/type-c/usbc0/ > > > > usbc0.svid:18d1 > > > > usbc0.svid:18d1/mode0 > > > > usbc0.svid:18d1/mode0/vdo > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Guenter Roeck
On Fri, Jun 03, 2016 at 06:17:46PM +0300, Heikki Krogerus wrote: [ ... ] > > > > > > > > In my test case, this gives me > > > > /sys/class/type-c/usbc0/ > > > > usbc0.svid:18d1 > > > > usbc0.svid:18d1/mode0 > > > > usbc0.svid:18d1/mode0/vdo > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Heikki Krogerus
On Fri, Jun 03, 2016 at 06:51:54AM -0700, Guenter Roeck wrote: > On 06/03/2016 06:21 AM, Heikki Krogerus wrote: > > Hi, > > > > On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: > > > On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > > > > On Wed, Jun 01, 2016 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Heikki Krogerus
On Fri, Jun 03, 2016 at 06:51:54AM -0700, Guenter Roeck wrote: > On 06/03/2016 06:21 AM, Heikki Krogerus wrote: > > Hi, > > > > On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: > > > On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > > > > On Wed, Jun 01, 2016 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Guenter Roeck
On 06/03/2016 06:21 AM, Heikki Krogerus wrote: Hi, On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Guenter Roeck
On 06/03/2016 06:21 AM, Heikki Krogerus wrote: Hi, On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Heikki Krogerus
Hi, On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: > On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > > On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > > On Thu, 2016-05-19

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-03 Thread Heikki Krogerus
Hi, On Thu, Jun 02, 2016 at 09:12:19AM -0700, Guenter Roeck wrote: > On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > > On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > > On Thu, 2016-05-19

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Guenter Roeck
On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Just noticed that the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Guenter Roeck
On Thu, Jun 02, 2016 at 01:18:53PM +0300, Heikki Krogerus wrote: > On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Just noticed that the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > Just noticed that the "active" file is for now read only, but it needs > > > to be changed to

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Wed, Jun 01, 2016 at 04:29:26PM -0700, Guenter Roeck wrote: > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > Just noticed that the "active" file is for now read only, but it needs > > > to be changed to

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Thu, Jun 02, 2016 at 08:30:57AM +0200, Oliver Neukum wrote: > On Wed, 2016-06-01 at 16:29 -0700, Guenter Roeck wrote: > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Just noticed that the "active" file is

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Thu, Jun 02, 2016 at 08:30:57AM +0200, Oliver Neukum wrote: > On Wed, 2016-06-01 at 16:29 -0700, Guenter Roeck wrote: > > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Just noticed that the "active" file is

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > Just noticed that the "active" file is for now read only, but it needs > > to be changed to writable. That file will of course provide means for > > the userspace to Exit

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Heikki Krogerus
On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > Just noticed that the "active" file is for now read only, but it needs > > to be changed to writable. That file will of course provide means for > > the userspace to Exit

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 23:37 -0700, Guenter Roeck wrote: > On 06/01/2016 11:24 PM, Oliver Neukum wrote: > > On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: > >> The class code would not explicitly learn about the reset, > >> but it would be informed about the exited modes. > > > > That has

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 23:37 -0700, Guenter Roeck wrote: > On 06/01/2016 11:24 PM, Oliver Neukum wrote: > > On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: > >> The class code would not explicitly learn about the reset, > >> but it would be informed about the exited modes. > > > > That has

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Guenter Roeck
On 06/01/2016 11:24 PM, Oliver Neukum wrote: On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: The class code would not explicitly learn about the reset, but it would be informed about the exited modes. That has drawbacks Playing devils advocate a bit here - it doesn't tell you

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Guenter Roeck
On 06/01/2016 11:24 PM, Oliver Neukum wrote: On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: The class code would not explicitly learn about the reset, but it would be informed about the exited modes. That has drawbacks Playing devils advocate a bit here - it doesn't tell you

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 16:29 -0700, Guenter Roeck wrote: > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > Just noticed that the "active" file is for now read only, but it needs > > > to be changed to writable. That

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 16:29 -0700, Guenter Roeck wrote: > On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > Just noticed that the "active" file is for now read only, but it needs > > > to be changed to writable. That

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: > The class code would not explicitly learn about the reset, > but it would be informed about the exited modes. That has drawbacks - it doesn't tell you what caused the mode to be left (if you UFP, it may be the regular command) - it is a

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-02 Thread Oliver Neukum
On Wed, 2016-06-01 at 06:34 -0700, Guenter Roeck wrote: > The class code would not explicitly learn about the reset, > but it would be informed about the exited modes. That has drawbacks - it doesn't tell you what caused the mode to be left (if you UFP, it may be the regular command) - it is a

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Guenter Roeck
On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > Just noticed that the "active" file is for now read only, but it needs > > to be changed to writable. That file will of course provide means for > > the userspace to Exit

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Guenter Roeck
On Wed, Jun 01, 2016 at 11:26:09AM +0200, Oliver Neukum wrote: > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > Just noticed that the "active" file is for now read only, but it needs > > to be changed to writable. That file will of course provide means for > > the userspace to Exit

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Guenter Roeck
On 06/01/2016 02:04 AM, Oliver Neukum wrote: On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: I think we can still add them later if they are still seen as necessity later on, tough I seriously doubt it. It would not be ideal, but adding an attribute should not really break anything,

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Guenter Roeck
On 06/01/2016 02:04 AM, Oliver Neukum wrote: On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: I think we can still add them later if they are still seen as necessity later on, tough I seriously doubt it. It would not be ideal, but adding an attribute should not really break anything,

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > Just noticed that the "active" file is for now read only, but it needs > to be changed to writable. That file will of course provide means for > the userspace to Exit and Enter modes. But please note that the > responsibility of the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > Just noticed that the "active" file is for now read only, but it needs > to be changed to writable. That file will of course provide means for > the userspace to Exit and Enter modes. But please note that the > responsibility of the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: > I think we can still add them later if they are still seen as > necessity later on, tough I seriously doubt it. It would not be > ideal, but adding an attribute should not really break anything, > right? Removing would. However, how do

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: > I think we can still add them later if they are still seen as > necessity later on, tough I seriously doubt it. It would not be > ideal, but adding an attribute should not really break anything, > right? Removing would. However, how do

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 10:20:34AM -0700, Guenter Roeck wrote: > > On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > > > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > > > On Tue, May 31, 2016 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Oliver Neukum
On Wed, 2016-06-01 at 11:23 +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 10:20:34AM -0700, Guenter Roeck wrote: > > On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > > > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > > > On Tue, May 31, 2016 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Heikki Krogerus
On Tue, May 31, 2016 at 10:20:34AM -0700, Guenter Roeck wrote: > On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > > > On Tue, 2016-05-31 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-06-01 Thread Heikki Krogerus
On Tue, May 31, 2016 at 10:20:34AM -0700, Guenter Roeck wrote: > On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > > > On Tue, 2016-05-31 at

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Guenter Roeck
On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > > > Hi Oliver, > > > > > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Guenter Roeck
On Tue, May 31, 2016 at 03:43:56PM +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > > > Hi Oliver, > > > > > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Guenter Roeck
On Tue, May 31, 2016 at 11:31:21AM +0300, Heikki Krogerus wrote: > Hi Oliver, > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > Hi guys, > > > > > > I'm attaching a diff instead of full v3. I'm not yet adding

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Guenter Roeck
On Tue, May 31, 2016 at 11:31:21AM +0300, Heikki Krogerus wrote: > Hi Oliver, > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > Hi guys, > > > > > > I'm attaching a diff instead of full v3. I'm not yet adding

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > > Hi Oliver, > > > > > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > > > On

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
On Tue, May 31, 2016 at 03:09:01PM +0300, Heikki Krogerus wrote: > On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > > Hi Oliver, > > > > > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > > > On

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > Hi Oliver, > > > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > > Hi guys, > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
On Tue, May 31, 2016 at 10:48:29AM +0200, Oliver Neukum wrote: > On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > > Hi Oliver, > > > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > > Hi guys, > > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Oliver Neukum
On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > Hi Oliver, > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > Hi guys, > > > > > > I'm attaching a diff instead of full v3. I'm not yet adding

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Oliver Neukum
On Tue, 2016-05-31 at 11:31 +0300, Heikki Krogerus wrote: > Hi Oliver, > > On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > > Hi guys, > > > > > > I'm attaching a diff instead of full v3. I'm not yet adding

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
Hi Oliver, On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > Hi guys, > > > > I'm attaching a diff instead of full v3. I'm not yet adding attributes > > for the reset and cable_reset. I still don't understand what is

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-31 Thread Heikki Krogerus
Hi Oliver, On Mon, May 30, 2016 at 03:59:27PM +0200, Oliver Neukum wrote: > On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > > Hi guys, > > > > I'm attaching a diff instead of full v3. I'm not yet adding attributes > > for the reset and cable_reset. I still don't understand what is

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-30 Thread Oliver Neukum
On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > Hi guys, > > I'm attaching a diff instead of full v3. I'm not yet adding attributes > for the reset and cable_reset. I still don't understand what is the > case where the userspace would need to be able to tricker reset? Why > isn't it

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-30 Thread Oliver Neukum
On Mon, 2016-05-30 at 16:19 +0300, Heikki Krogerus wrote: > Hi guys, > > I'm attaching a diff instead of full v3. I'm not yet adding attributes > for the reset and cable_reset. I still don't understand what is the > case where the userspace would need to be able to tricker reset? Why > isn't it

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-30 Thread Heikki Krogerus
Hi guys, I'm attaching a diff instead of full v3. I'm not yet adding attributes for the reset and cable_reset. I still don't understand what is the case where the userspace would need to be able to tricker reset? Why isn't it enough for the userspace to be able to enter/exit modes? Oliver! Can

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-30 Thread Heikki Krogerus
Hi guys, I'm attaching a diff instead of full v3. I'm not yet adding attributes for the reset and cable_reset. I still don't understand what is the case where the userspace would need to be able to tricker reset? Why isn't it enough for the userspace to be able to enter/exit modes? Oliver! Can

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-27 Thread Heikki Krogerus
On Wed, May 25, 2016 at 08:19:47AM -0700, Guenter Roeck wrote: > On Wed, May 25, 2016 at 02:28:46PM +0300, Heikki Krogerus wrote: > > Hi, > > > > On Tue, May 24, 2016 at 02:51:40PM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > > > Hi, > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-27 Thread Heikki Krogerus
On Wed, May 25, 2016 at 08:19:47AM -0700, Guenter Roeck wrote: > On Wed, May 25, 2016 at 02:28:46PM +0300, Heikki Krogerus wrote: > > Hi, > > > > On Tue, May 24, 2016 at 02:51:40PM +0200, Oliver Neukum wrote: > > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > > > Hi, > > >

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-27 Thread Heikki Krogerus
On Wed, May 25, 2016 at 07:59:57AM -0700, Guenter Roeck wrote: > On Wed, May 25, 2016 at 04:20:56PM +0200, Oliver Neukum wrote: > > On Wed, 2016-05-25 at 17:04 +0300, Heikki Krogerus wrote: > > > > > I'm not against leaving the responsibility of registering the alternate > > > modes to the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-27 Thread Heikki Krogerus
On Wed, May 25, 2016 at 07:59:57AM -0700, Guenter Roeck wrote: > On Wed, May 25, 2016 at 04:20:56PM +0200, Oliver Neukum wrote: > > On Wed, 2016-05-25 at 17:04 +0300, Heikki Krogerus wrote: > > > > > I'm not against leaving the responsibility of registering the alternate > > > modes to the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-25 Thread Guenter Roeck
On Wed, May 25, 2016 at 02:28:46PM +0300, Heikki Krogerus wrote: > Hi, > > On Tue, May 24, 2016 at 02:51:40PM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Hi, > > > > as this discussion seems to go in circles, I am starting anew > > at the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-25 Thread Guenter Roeck
On Wed, May 25, 2016 at 02:28:46PM +0300, Heikki Krogerus wrote: > Hi, > > On Tue, May 24, 2016 at 02:51:40PM +0200, Oliver Neukum wrote: > > On Thu, 2016-05-19 at 15:44 +0300, Heikki Krogerus wrote: > > > > Hi, > > > > as this discussion seems to go in circles, I am starting anew > > at the

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-25 Thread Guenter Roeck
On Wed, May 25, 2016 at 04:20:56PM +0200, Oliver Neukum wrote: > On Wed, 2016-05-25 at 17:04 +0300, Heikki Krogerus wrote: > > > I'm not against leaving the responsibility of registering the alternate > > modes to the drivers. I'm a little bit worried about relying then on > > the drivers to also

Re: [RFC PATCHv2] usb: USB Type-C Connector Class

2016-05-25 Thread Guenter Roeck
On Wed, May 25, 2016 at 04:20:56PM +0200, Oliver Neukum wrote: > On Wed, 2016-05-25 at 17:04 +0300, Heikki Krogerus wrote: > > > I'm not against leaving the responsibility of registering the alternate > > modes to the drivers. I'm a little bit worried about relying then on > > the drivers to also

  1   2   >