From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932271AbcEXJJt (ORCPT ); Tue, 24 May 2016 05:09:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:45306 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbcEXJJq (ORCPT ); Tue, 24 May 2016 05:09:46 -0400 Message-ID: <1464080771.11721.4.camel@suse.com> Subject: Re: [RFC PATCHv2] usb: USB Type-C Connector Class From: Oliver Neukum To: Guenter Roeck Cc: Andy Shevchenko , Rajaram R , Felipe Balbi , Heikki Krogerus , Mathias Nyman , Greg KH , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Tue, 24 May 2016 11:06:11 +0200 In-Reply-To: <20160523170919.GB5964@roeck-us.net> References: <1463661894-22820-1-git-send-email-heikki.krogerus@linux.intel.com> <1463753999.14070.7.camel@suse.com> <20160523095733.GB16900@kuha.fi.intel.com> <1464002719.12181.42.camel@suse.com> <20160523170919.GB5964@roeck-us.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2016-05-23 at 10:09 -0700, Guenter Roeck wrote: > On Mon, May 23, 2016 at 01:25:19PM +0200, Oliver Neukum wrote: > > On Mon, 2016-05-23 at 12:57 +0300, Heikki Krogerus wrote: > > > > A reset is a generic function, so it does not belong to specific > > drivers. > > > A would expect the driver to execute the reset. > > Maybe the question should be phrased differently: Even USCI (which > doesn't provide for everything) has commands to reset the policy > manager and to reset the connector. The class should provide a means > to execute those commands. Yes. > > So for Alternate Modes we need on a high level the following features > > > > 1. discovery of available Alternate Modes > > 2. selection of an Alternate Mode > > 3. notification about entering an Alternate Mode > > 4. triggering a reset > > 5. notification about resets > > > > 6. discovery about the current role > > 7. switching roles > > 8. setting preferred roles (Try.SRC and Try.SNK) > > > > Isn't reset and role handling orthogonal to alternate mode functionality ? > Both will still be needed even if alternate mode support is not implemented > at all. In part. A reset can cause the Alternate Mode to be left unexpectedly and unintentionally. So how many APIs do we want? Three: - Alternate Modes - USB PD - type C for roles and reset Or another number? > > I like your API as it is now. But it is incomplete. > > > > Same here. So what is to be done? Regards Oliver