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

From: Oliver Neukum
Date: Wed Jun 01 2016 - 05:29:53 EST

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 dependencies between the modes, say, if a plug
> needs to be in one mode or the other in order for the partner to enter
> some specific mode, will fall on the Alternate Mode specific drivers
> once we have the altmode bus. I remember there were concerns about
> this in the original thread.

There's one thing we haven't touched upon yet. And I cannot really find
an answer in the spec.

What do we do if we return from S4 or S3? I think we need to restore
the ALternate Mode because our display may be running over that
Alternate Mode.
If we want to support USB persist we also need to restore data role
after S4.