Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-25 Thread Heikki Krogerus
Hi Guenter, On Fri, Apr 21, 2017 at 03:15:52PM -0700, Guenter Roeck wrote: > +/* > + * Logging > + */ > + > +#ifdef CONFIG_DEBUG_FS > + > +static bool tcpm_log_full(struct tcpm_port *port) > +{ > + return port->logbuffer_tail == > + (port->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-25 Thread Heikki Krogerus
Hi Guenter, On Fri, Apr 21, 2017 at 03:15:52PM -0700, Guenter Roeck wrote: > +/* > + * Logging > + */ > + > +#ifdef CONFIG_DEBUG_FS > + > +static bool tcpm_log_full(struct tcpm_port *port) > +{ > + return port->logbuffer_tail == > + (port->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Guenter Roeck
Hi Mats, On Mon, Apr 24, 2017 at 8:57 AM, Mats Karrman wrote: > Hello Guenter, > > Some corrections and suggestions follow. > Thanks a lot! > And then of course it would be nice to factor out the alternate mode > handling > so new mode handlers could be registered as

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Guenter Roeck
Hi Mats, On Mon, Apr 24, 2017 at 8:57 AM, Mats Karrman wrote: > Hello Guenter, > > Some corrections and suggestions follow. > Thanks a lot! > And then of course it would be nice to factor out the alternate mode > handling > so new mode handlers could be registered as needed :) > Agreed.

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Mats Karrman
Hello Guenter, Some corrections and suggestions follow. And then of course it would be nice to factor out the alternate mode handling so new mode handlers could be registered as needed :) BR // Mats On 04/22/2017 12:15 AM, Guenter Roeck wrote: From: Guenter Roeck This

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Mats Karrman
Hello Guenter, Some corrections and suggestions follow. And then of course it would be nice to factor out the alternate mode handling so new mode handlers could be registered as needed :) BR // Mats On 04/22/2017 12:15 AM, Guenter Roeck wrote: From: Guenter Roeck This driver implements

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-21 Thread Guenter Roeck
On 04/21/2017 03:15 PM, Guenter Roeck wrote: From: Guenter Roeck This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-21 Thread Guenter Roeck
On 04/21/2017 03:15 PM, Guenter Roeck wrote: From: Guenter Roeck This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code implemented in the following

[RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-21 Thread Guenter Roeck
From: Guenter Roeck This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code implemented in the following patches. usb:

[RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-21 Thread Guenter Roeck
From: Guenter Roeck This driver implements the USB Type-C Power Delivery state machine for both source and sink ports. Alternate mode support is not fully implemented. The driver attaches to the USB Type-C class code implemented in the following patches. usb: typec: add driver for