Re: [PATCH v5 1/3] usb: typec: tcpm: AMS and Collision Avoidance

2021-01-13 Thread Hans de Goede
Hi, On 1/13/21 3:46 PM, Kyle Tso wrote: > On Wed, Jan 13, 2021 at 2:11 PM Badhri Jagan Sridharan > wrote: >> >> Hi Kyle, >> >> Do you want to handle the FAST_ROLE_SWAP case as well ? >> > I forgot this part > Thanks for catching this. > I will fix it. That sounds like a v6 is upcoming which

Re: [PATCH v5 1/3] usb: typec: tcpm: AMS and Collision Avoidance

2021-01-13 Thread Kyle Tso
On Wed, Jan 13, 2021 at 2:11 PM Badhri Jagan Sridharan wrote: > > Hi Kyle, > > Do you want to handle the FAST_ROLE_SWAP case as well ? > I forgot this part Thanks for catching this. I will fix it. > You would have to fix up in two places: > > #1 > - if (port->state == S

Re: [PATCH v5 1/3] usb: typec: tcpm: AMS and Collision Avoidance

2021-01-13 Thread Kyle Tso
On Tue, Jan 12, 2021 at 9:29 PM Heikki Krogerus wrote: > > On Wed, Jan 06, 2021 at 12:39:25AM +0800, Kyle Tso wrote: > > This patch provides the implementation of Collision Avoidance introduced > > in PD3.0. The start of each Atomic Message Sequence (AMS) initiated by > > the port will be denied i

Re: [PATCH v5 1/3] usb: typec: tcpm: AMS and Collision Avoidance

2021-01-12 Thread Badhri Jagan Sridharan
Hi Kyle, Do you want to handle the FAST_ROLE_SWAP case as well ? You would have to fix up in two places: #1 - if (port->state == SNK_READY) - tcpm_set_state(port, FR_SWAP_SEND, 0); - else + if (port->

Re: [PATCH v5 1/3] usb: typec: tcpm: AMS and Collision Avoidance

2021-01-12 Thread Heikki Krogerus
On Wed, Jan 06, 2021 at 12:39:25AM +0800, Kyle Tso wrote: > This patch provides the implementation of Collision Avoidance introduced > in PD3.0. The start of each Atomic Message Sequence (AMS) initiated by > the port will be denied if the current AMS is not interruptible. The > Source port will set