Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753148AbbLWREk (ORCPT ); Wed, 23 Dec 2015 12:04:40 -0500 Received: from mail-db3on0067.outbound.protection.outlook.com ([157.55.234.67]:52096 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752671AbbLWREg convert rfc822-to-8bit (ORCPT ); Wed, 23 Dec 2015 12:04:36 -0500 X-Greylist: delayed 42165 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Dec 2015 12:04:35 EST From: Jun Li To: Ramneek Mehresh , Felipe Balbi , "linux-kernel@vger.kernel.org" CC: "stern@rowland.harvard.edu" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" Subject: RE: [PATCH 0/7][v4] Add OTG support for FSL socs Thread-Topic: [PATCH 0/7][v4] Add OTG support for FSL socs Thread-Index: AQHRPOWIo2KIMiU280am0Ikf1Gw/sJ7X/dgQgACA8QCAACX1wA== Date: Wed, 23 Dec 2015 16:31:33 +0000 Message-ID: References: <1440693787-7339-1-git-send-email-ramneek.mehresh@freescale.com> <87fv1ju42r.fsf@saruman.tx.rr.com> <87a8rru3oq.fsf@saruman.tx.rr.com> <871taepcp2.fsf@saruman.tx.rr.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jun.li@nxp.com; x-originating-ip: [199.59.226.141] x-microsoft-exchange-diagnostics: 1;AM4PR04MB1665;5:RtiDTm5J1ZGQ6FIywqgSD2VctS/q8/IN9IS6kST9zS3XV37fh19m/kenQL8WdIU5XcAIvqqGQ7V2tU5+DEgPAuKxBqpUAgJAzvuN3b2JK/8xa5B2Yfg3rkRN0kogE+DsE/EKWZKxYnTpREY8LTpL/w==;24:YsZVXyw1XkJDq5CykPzgX0km6I5JHVVAiZ0lJlln5yIAHHRAA7Y4LngKdiuj75ZDIhxJUvi7eA2vs3zzrHilYhJjcx/RKG0fBnkU42n6Pag= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM4PR04MB1665; x-ld-processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(35762410373642)(101931422205132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001);SRVR:AM4PR04MB1665;BCL:0;PCL:0;RULEID:;SRVR:AM4PR04MB1665; x-forefront-prvs: 0799B1B2D7 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(377454003)(13464003)(189002)(40100003)(5003600100002)(5002640100001)(5250100002)(87936001)(19580395003)(19580405001)(33656002)(66066001)(101416001)(50986999)(74316001)(76176999)(54356999)(93886004)(86362001)(106116001)(106356001)(105586002)(1096002)(5001770100001)(1220700001)(5001960100002)(97736004)(189998001)(76576001)(586003)(11100500001)(3846002)(2900100001)(5004730100002)(5008740100001)(6116002)(2950100001)(102836003)(92566002)(2501003)(81156007)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR04MB1665;H:AM4PR04MB1665.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Dec 2015 16:31:33.0819 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR04MB1665 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5192 Lines: 133 > -----Original Message----- > From: Ramneek Mehresh [mailto:ramneek.mehresh@freescale.com] > Sent: Wednesday, December 23, 2015 8:20 PM > To: Jun Li ; Felipe Balbi ; linux- > kernel@vger.kernel.org > Cc: stern@rowland.harvard.edu; gregkh@linuxfoundation.org; linux- > usb@vger.kernel.org > Subject: RE: [PATCH 0/7][v4] Add OTG support for FSL socs > > > > > -----Original Message----- > > From: Jun Li [mailto:jun.li@nxp.com] > > Sent: Wednesday, December 23, 2015 10:36 AM > > To: Felipe Balbi ; Mehresh Ramneek-B31383 > > ; linux-kernel@vger.kernel.org > > Cc: stern@rowland.harvard.edu; gregkh@linuxfoundation.org; linux- > > usb@vger.kernel.org > > Subject: RE: [PATCH 0/7][v4] Add OTG support for FSL socs > > > > Hi > > > > > -----Original Message----- > > > From: linux-usb-owner@vger.kernel.org [mailto:linux-usb- > > > owner@vger.kernel.org] On Behalf Of Felipe Balbi > > > Sent: Wednesday, December 23, 2015 2:21 AM > > > To: Ramneek Mehresh ; linux- > > > kernel@vger.kernel.org > > > Cc: stern@rowland.harvard.edu; gregkh@linuxfoundation.org; linux- > > > usb@vger.kernel.org > > > Subject: RE: [PATCH 0/7][v4] Add OTG support for FSL socs > > > > > > > > > Hi, > > > > > > Ramneek Mehresh writes: > > > >> -----Original Message----- > > > >> From: Felipe Balbi [mailto:balbi@ti.com] > > > >> Sent: Saturday, October 10, 2015 3:04 AM > > > >> To: Mehresh Ramneek-B31383 ; > > linux- > > > >> kernel@vger.kernel.org > > > >> Cc: stern@rowland.harvard.edu; gregkh@linuxfoundation.org; linux- > > > >> usb@vger.kernel.org; Mehresh Ramneek-B31383 > > > >> > > > >> Subject: Re: [PATCH 0/7][v4] Add OTG support for FSL socs > > > >> > > > >> Felipe Balbi writes: > > > >> > > > >> > Hi, > > > >> > > > > >> > Ramneek Mehresh writes: > > > >> >> Add support for otg for all freescale socs having internal usb > phy. > > > >> >> > > > >> >> Ramneek Mehresh (7): > > > >> >> usb:fsl:otg: Make fsl otg driver as tristate > > > >> >> usb:fsl:otg: Add controller version based ULPI and UTMI phy > > > >> >> usb:fsl:otg: Add support to add/remove usb host driver > > > >> >> usb:fsl:otg: Signal host drv when host is otg > > > >> >> usb:fsl:otg: Modify otg_event to start host drv > > > >> >> usb:fsl:otg: Combine host/gadget start/resume for ID change > > > >> >> usb:fsl:otg: Add host-gadget drv sync delay > > > >> > > > > >> > Unless Alan's okay with the host side changes, I can't accept > > > >> > any of these. However, I must say some of the flags you add > > > >> > here already exist in some way, shape or form. For example, > > > >> > look at > > > is_b_host flag. > > > >> > > > > > > > > Could you please be more specific...which flag you think that I > > > >should remove/I'm re-defining. The flags I'm defining are: > > > > > > > > have_hcd : defined in fsl specific structure for fsl specific > > > > use-case > > > > > > > > had_hcd: defined in fsl specific structure for fsl specific > > > > use-case > > > > > > > > is_otg : defined in include/linux/usb.h > > > > > > > > Are you suggesting using otg_port or is_b_host instead of is_otg? > > > > > > > > As I understand, is_b_host is specifically to check if an otg B > > > > device is in host mode...correct? I just need a flag to check if > > > > a controller is capable of otg operations? That's why defined > "is_otg" > > > > flag. Please suggest. > > > > > > no, I don't know why I made that comment. You could use otg_port, > > > but that wouldn't look very clean. Can you resend with Alan's ack, > > > then I'll move this series into testing/next. > > > > > > -- > > > balbi > > > > Can you directly put the change_hcd_work in its phy driver(phy-fsl- > usb.c)? > > Then add/remove hcd will not through ehci_fsl_drv_suspend/resume, With > > this, you can make it work without a new flag "is_otg". > > > change_hcd_work() changes host controller mode, and hence, should be in > host controller driver. Reasonable, but most of OTG stuff not belong to phy actully, I see phy-msm-usb.c directly do hcd add/remove for OTG. > To move this to phy driver (just to avoid usage of > a single flag) won't be a good idea. I just saw you simply still use the suspend/resume method, but the change_hcd_work actually has nothing to do with it now, then add a flag to return for it, also the flag in your usage is not to indicate if the host capable/enabled otg, but something like is_host_role_to_be_changed_for_otg(test and then clear). Meanwhile you add another 2 flags in ehci_fsl(have_hcd, add_hcd) also for OTG host add/remove, so I am thinking if all those can be simplified. > In this case, I'll also have to move some host controller specific flags > to phy drv which won't be correct. > > > Li Jun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/