Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933729AbdCHGuy (ORCPT ); Wed, 8 Mar 2017 01:50:54 -0500 Received: from mail-ve1eur01on0075.outbound.protection.outlook.com ([104.47.1.75]:12306 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751226AbdCHGus (ORCPT ); Wed, 8 Mar 2017 01:50:48 -0500 From: Peter Chen To: Guenter Roeck , Heikki Krogerus CC: Peter Chen , Greg KH , Felipe Balbi , Oliver Neukum , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , Roger Quadros , Jun Li Subject: RE: [PATCH v17 2/3] usb: USB Type-C connector class Thread-Topic: [PATCH v17 2/3] usb: USB Type-C connector class Thread-Index: AQHSjE7Zns8DlLo/Z0qwb9O6z97wi6GChcqAgAC3ToCAA9itgIAAyUyAgADLioCAAH6WgIABG7iAgABSkDA= Date: Wed, 8 Mar 2017 06:50:12 +0000 Message-ID: References: <20170221142405.76299-1-heikki.krogerus@linux.intel.com> <20170221142405.76299-3-heikki.krogerus@linux.intel.com> <20170303033529.GA18650@b29397-desktop> <20170303143133.GB6999@kuha.fi.intel.com> <20170306011551.GA23305@b29397-desktop> <20170306131619.GD6999@kuha.fi.intel.com> <20170307085753.GF6999@kuha.fi.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: roeck-us.net; dkim=none (message not signed) header.d=none;roeck-us.net; dmarc=none action=none header.from=nxp.com; x-originating-ip: [199.59.231.64] x-microsoft-exchange-diagnostics: 1;HE1PR04MB2970;7:0Zhi5YreC3wvZ5D67bNSfPJ4fD3qQVxOJiMSMm7dQrRpPxNByTMq45kJCX9HbjTsUazE9/A/xkJx+np94XwTt1g67ImLPJpmHXwfrlOqPIkVK5Jz2uipkbxE7hq5alEyl4jCPfcBqglcHciwlzJf9PHB2C7r7ZiAyOa7K155tmbkvwd5m0xqm7IlJZiQICTVWFzxd7XBNAHFI4E4UZpMcedbwoq7HTbPg60gN/Kqvkmmw8FQcxDPZDVxv7tF8dFRRAdCfiESxunswS2DKhcA+QRYloDYokIq3fohrau9M2BeqZoxnLYYUq9Kn846H3i06Mpl52lTw7F+uGIPZ/iGpA== x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(39850400002)(39410400002)(39450400003)(39840400002)(81166006)(106116001)(3280700002)(76176999)(50986999)(54356999)(4326008)(122556002)(8676002)(39060400002)(2906002)(66066001)(3846002)(6116002)(305945005)(2950100002)(102836003)(77096006)(33656002)(7736002)(53936002)(7696004)(86362001)(229853002)(74316002)(25786008)(9686003)(189998001)(3660700001)(55016002)(6436002)(54906002)(8936002)(99286003)(6506006)(2900100001)(93886004)(6246003)(5660300001)(38730400002);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB2970;H:HE1PR04MB1450.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; x-ms-office365-filtering-correlation-id: 8ce41122-d70c-4f35-1e0d-08d465ef5ef4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:HE1PR04MB2970; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123555025)(20161123564025)(20161123558025)(6072148);SRVR:HE1PR04MB2970;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB2970; x-forefront-prvs: 02408926C4 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2017 06:50:12.9165 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB2970 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v286pQmc009510 Content-Length: 1750 Lines: 40 >>> You mean type-C trigger an ACPI event, and this ACPI event can notify >>> related USB controller driver doing role switch? >> >> No (firmware programs the dual-role hw/registers), but never mind. >> That could be the case. >> >>> If it is correct, there is a notifier between type-C and USB >>> controller driver, how to define this notifier for non-ACPI platform? >> >> Once there is a platform with Type-C like that, the problem needs to >> be solved. However.. >> >>>> I'm not commenting on Roger's dual role patch series, but I don't >>>> really think it should be mixed with Type-C. USB Type-C and USB >>>> Power Delivery define their own ways of handling the roles, and they >>>> are not limited to the data role only. Things like OTG for example >>>> will, and actually can not be supported. With Type-C we will have >>>> competing state machines compared to OTG. The dual-role framework >>>> may be useful on systems that provide more traditional connectors, >>>> which possibly have the ID-pin like micro-AB, and possibly also >>>> support OTG. It can also be something that exist in parallel with the Type-C >class, but there just can not be any dependencies between the two. >>>> >>> >>> Yes, there are two independent things. But if the kernel doesn't have >>> a notifier between type-C message sender (type-c class) and message >>> receiver (like USB controller driver for role switch or other drivers >>> for alternate mode message), we had to find some ways at userspace. >> >> ..what ever the solution is, it really can't rely on user space. >> > >... and, at least for our application, using extcon for the necessary notifications works >just fine. > I see, that means you have a hardware signal to notify role switch. Peter