Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753926AbbHXGRR (ORCPT ); Mon, 24 Aug 2015 02:17:17 -0400 Received: from mail-by2on0126.outbound.protection.outlook.com ([207.46.100.126]:31840 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751475AbbHXGRQ convert rfc822-to-8bit (ORCPT ); Mon, 24 Aug 2015 02:17:16 -0400 From: Ramneek Mehresh To: Alan Stern CC: "linux-kernel@vger.kernel.org" , "balbi@ti.com" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , Li Leo Subject: RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Thread-Topic: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb host driver Thread-Index: AQHQ1fOLHEZ3GswMtUS/GfcJ3NrDb54KRRoAgAohELCAAJG0AIAFwn+g Date: Mon, 24 Aug 2015 06:17:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ramneek.mehresh@freescale.com; x-originating-ip: [192.88.169.1] x-microsoft-exchange-diagnostics: 1;DM2PR0301MB0733;5:LEg+llmOzC7rLVyh2nd7ffnNrIb4oREd43o0XCd2eQWwklGXc1eI481+bvth4CtSP8Nlfl+psWFqRu2qNF768coCf2PH3T4IEYRuW4NmgfFrnhvoHEk7lczLZLo36RtOTDXsV0wh9ZCmsI5naZQCqQ==;24:K2VUaXrUZFt55hu5f++MmyCDimXIWXQQUaVgzMVswzOOw0BRg6VRWMI6n1UCSDxCsWGbwKCPC8KZotvVbGzPcv73OhxjAvK+wMXfvprA1JY=;20:0TdbY5naTa0R463u5hYtWVMVxSAYGNB/k6gx78Wze4YL38YB2r9TrvcnFx0Kk5aa4SSCq3XtpXLA24KZhXA6eA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0733;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1248; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:DM2PR0301MB0733;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0733; x-forefront-prvs: 06780E24F8 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(24454002)(199003)(377454003)(13464003)(77156002)(2171001)(92566002)(62966003)(2656002)(2900100001)(74316001)(87936001)(106356001)(105586002)(46102003)(99286002)(76576001)(106116001)(76176999)(5004730100002)(5007970100001)(10400500002)(5001860100001)(5001830100001)(68736005)(81156007)(19580405001)(66066001)(97736004)(5003600100002)(64706001)(4001540100001)(77096005)(110136002)(19580395003)(5001960100002)(189998001)(33656002)(102836002)(54356999)(101416001)(107886002)(2950100001)(86362001)(5002640100001)(122556002)(50986999)(40100003)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0733;H:SN1PR0301MB1583.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Aug 2015 06:17:11.7925 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0733 X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1248;2:jEl+w4XWwAPCFZLB1AoO5P7l/z8spaqZQhCXsVvwYQHY0uLsNNBdpAQ7ymOVF020qU+p7qyPSteOBNOKORweQfQYzAVV0K18VQcMC4QZaLmWpMutNWk7Jr9W2EOFZW3vB9yT4uyEB22VcDG6z8JucM3iPtLrmjFYxm/24ITLlOY=;3:w/8Twg4/IbH3I7DCgpxfj13sLgkdC6U1awiKPC2/x75eSKiQZJrTLqZTAsTi126n08dL/EU+74jK3jWJbKzppjwhyAe0eNHftLmSDlyzAegymaB5IV6Chdf+SNoMvzwbkMReMAqP6dPZrzB5cyspGg==;25:K0Iq+ZLkzLOEWoIzh2L913oOSieCAs635igss55T953JJ21ITXKfPkarosSo81nlw6RZ0u7iF+sGYI23iSNt0Mxp15Rl3oaYLtefE8c9Ybzjj4r8P11P2reOB48imHFYIa1iAQuBHxGq/7mIulKmnhqQ9FY00IYg9ufrWwC4a70Kx0Pa192EUH2HspFkC3IgzSxjkqZV+/3m+9SwQr9lzxCG6eT2vUOzEF845kfO22m5ygWF9KmodJXrmpnbtcna;23:Z8VICngfeiChL9rekvLoakPRxWuHTpHbvGdepsGuGbYZa0uG4XdHwQLAgZE2V4i7zkNOQjEbHHoQuUVD/F81fDJchy0zqocSU5Bj4WCRyUwCn/OftdX6FUBYWxwwxmnMS9Nf1V/rmC5YVnDnBp19GCNQyBLL5OjEZ244P+DdkJHHp2OxsNM4Ux1JagS6bsP6 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2109 Lines: 53 > -----Original Message----- > From: Alan Stern [mailto:stern@rowland.harvard.edu] > Sent: Thursday, August 20, 2015 7:40 PM > To: Mehresh Ramneek-B31383 > Cc: linux-kernel@vger.kernel.org; balbi@ti.com; > gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; Li Yang-Leo-R58472 > > Subject: RE: [PATCH 3/8][v3]usb:fsl:otg: Add support to add/remove usb > host driver > > On Thu, 20 Aug 2015, Ramneek Mehresh wrote: > > > > > --- a/drivers/usb/host/ehci-fsl.h > > > > +++ b/drivers/usb/host/ehci-fsl.h > > > > @@ -63,4 +63,22 @@ > > > > #define UTMI_PHY_EN (1<<9) > > > > #define ULPI_PHY_CLK_SEL (1<<10) > > > > #define PHY_CLK_VALID (1<<17) > > > > + > > > > +struct ehci_fsl { > > > > +#ifdef CONFIG_PM > > > > + /* Saved USB PHY settings, need to restore after deep sleep. */ > > > > + u32 usb_ctrl; > > > > +#endif > > > > > > Do you need this #ifdef? > > > > > Yes, this is required for deep-sleep support...we need to save/restore > controller > > registers during deep-sleep when usb controller power is shut-off. Don't > need this > > during normal usb operation...saving/restoring usb controller registers in > non deep-sleep > > scenario will add unnecessary delays > > What I meant was, can you keep the "u32 usb_ctrl;" line but get rid of > the "#ifdef CONFIG_PM" and "#endif" lines? > > Alan Stern I do understand that. However, USB suspend/resume functionality work in context of PM. Only in this context, we need to save/restore usb controller register for deep-sleep functionality. If you see usage of this in ehci-fsl.c file, it's used in ehci_fsl_drv_suspend() under CONFIG_PM to save USB CNTL register. If I remove CONFIG_PM from struct ehci_fsl{}, I'll need to change the entire driver also to make suspend and resume functionalities compile by default. -- 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/