[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160525145957.GA19413@roeck-us.net>
Date: Wed, 25 May 2016 07:59:57 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Oliver Neukum <oneukum@...e.com>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Rajaram R <rajaram.officemail@...il.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Greg KH <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [RFC PATCHv2] usb: USB Type-C Connector Class
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 handle the unregistering accordingly, but I can
> > live with that. But we just shouldn't share the responsibility of
> > un/registering them between the class and the drivers, so the driver
> > should then handle the registration always.
> >
> > Oliver, what do you think?
>
> Either will do for me. Registration by the drivers is a bit better.
> But it has to be the one or the other. Mixing is indeed bad.
>
Same here. I don't have any problems handling unregistering
from the driver. I just have to keep track of the state and call
typec_unregister_altmodes() before calling typec_disconnect().
Having to wait for mode discovery to complete before calling
typec_connect() is much more complicated, at least with my current
code.
Guenter
Powered by blists - more mailing lists