Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Bin Gao
On Wed, Jul 27, 2016 at 11:13:43AM +0300, Felipe Balbi wrote: > > Hi, > > Bin Gao writes: > > This patch implements a simple USB Power Delivery sink port state machine. > > It assumes the hardware only handles PD packet transmitting and receiving > > over the CC line of the USB Type-C connector.

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Bin Gao
On Wed, Jul 27, 2016 at 11:21:13AM +0200, Oliver Neukum wrote: > On Tue, 2016-07-26 at 11:37 -0700, Bin Gao wrote: > > +#define MAKE_HEADER(port, header, msg, objs) \ > > +do { \ > > + header->type = msg; \ > > + header->data_role = PD_DATA_ROLE_UFP; \ > > + header->revision = por

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Oliver Neukum
On Tue, 2016-07-26 at 11:37 -0700, Bin Gao wrote: > +#define MAKE_HEADER(port, header, msg, objs) \ > +do { \ > + header->type = msg; \ > + header->data_role = PD_DATA_ROLE_UFP; \ > + header->revision = port->pd_rev; \ > + header->power_role = PD_POWER_ROLE_SINK; \ > +

Re: [PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-27 Thread Felipe Balbi
Hi, Bin Gao writes: > This patch implements a simple USB Power Delivery sink port state machine. > It assumes the hardware only handles PD packet transmitting and receiving > over the CC line of the USB Type-C connector. The state transition is > completely controlled by software. This patch onl

[PATCH v2 1/2] usb: typec: Add USB Power Delivery sink port support

2016-07-26 Thread Bin Gao
This patch implements a simple USB Power Delivery sink port state machine. It assumes the hardware only handles PD packet transmitting and receiving over the CC line of the USB Type-C connector. The state transition is completely controlled by software. This patch only implement the sink port funct