Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751947AbbGMDV1 (ORCPT ); Sun, 12 Jul 2015 23:21:27 -0400 Received: from mail-bn1bon0117.outbound.protection.outlook.com ([157.56.111.117]:59804 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751865AbbGMDVZ (ORCPT ); Sun, 12 Jul 2015 23:21:25 -0400 X-Greylist: delayed 1949 seconds by postgrey-1.27 at vger.kernel.org; Sun, 12 Jul 2015 23:21:25 EDT Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Mon, 13 Jul 2015 09:58:00 +0800 From: Peter Chen To: Roger Quadros CC: , , , , , , , , , , Subject: Re: [PATCH v3 04/11] otg-fsm: move usb_bus_start_enum into otg-fsm->ops Message-ID: <20150713015759.GC27710@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-5-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1436350777-28056-5-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD014;1:OGHu6Wcd7+i7I3sbY/ZSMSHY5dMpYlD0WJiZ5e+YxUXl23VWNyYbaM4zIyz+Y3G4mtQsWqDRwrOynVXZz6rAm7fgXi34aAn2A13fx2RGoeMxqKGBCDp+olX0NBkp0voPvbFiti/PjXCdlep6Y+7MpjuBhfKaeGuWvOBaru1n0xLr4kQPwy88azQs+RPFMuv7cTQ9BWUH0+irifgkHomLLUB/awHhULKIk+zkNIi4knIn1ZXAwfwWVPJ2+gNbCBfBGWkUxQiqdSTMsU6J4KxulCfJmgi1pKek+1neoajLFYmBm/o02aEy1KTNmDnDDwrfvrsN+b4ByTEc3Gh7RghS3EZTISDcY7n2ZNeWQ3UP1XcxoOlUKb11Rsc/djcxvg9g4lu/AmvRk+jYuhcjPTLY9w86NByExGhoihez/YivexNpZ42j+NhCyw1DgxHZTRhGuIvHhjyaMXIPU5ilaHdRkA== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(1060300003)(339900001)(51704005)(24454002)(189002)(199003)(97756001)(50986999)(54356999)(76176999)(77156002)(5001960100002)(110136002)(62966003)(46102003)(47776003)(33716001)(110436001)(5001920100001)(104016003)(33656002)(105606002)(106466001)(46406003)(23726002)(6806004)(50466002)(19580395003)(19580405001)(85426001)(92566002)(87936001)(77096005)(4290100001)(2950100001)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1219;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;2:gpdcAxifi/Smo2wP/RtK6jUZgBzWRIHI2QY2RJuNmBwuGKfUQKOR6/Ymieh4igOr;3:y0a0IgyXGY++OrOkL8IztcgR9PHc/jvgdU3IJVUAX7YxRGXqvr0+NL5cALoGf8gKICofrQVMiAa+yEGXz9zcZ9relePAvqY0LIWj5ZUlyu/xTD3ffm5goE5wOwpL4AHvUfdVdnNIliVIZelLdc36xnjfgO9Lwfk82WreC5+gAQBXwoCQShab/Sjp12+t2p23EQGC/lALHgVY5hdf3eXXWJRhO4lSc7KEwvayvDv6HHc=;25:MUGw0HqkvttQB3xiG/hhF0YoCU5hCMRC3fWcUCM6PygLg3opnKLVPOltoNdkhQKcb7FWvA7tZNt6xm9KhS2qJ/5A820+zc1l/iGxqJ/0j7FJTa0nV622lmtZz/ybcfZmdgGNKsliBcyVCIgpz8+9QkgawTGLr/1FPKRXB+o1f8DPbjJk5Ub0pOr5Bqicy6c07x2bcQFiinYXDA7vyo0pF20LgWRV9pm1f2RwQJu+GAlTQYkSlSx1sjnEBlFe8m/dwxg6lRrm/uVRNEqhKyW6Iw==;20:KSu4Sa7DZ+u/apZuSA35QXGyMygT6aRK+UxzEHjiUklNjBEYum3GZ/yOtEARH/pRJoL6/zL69IGF1rug0y58R60r3vQfJzJTxvpv9VssYJ8WtA6GzTj9dbweLuuQHeH2ZTFyB8XzyPltkX8mY1VHuYMljjkMw5csvL6huAg9lHVOSg0/BtmqIzvqR+xUVtmS6Me+e9FfbhVIGrO+6uvyxede57t9iuKE05MXgMthUgWNI+LH0/ajt9Lac5AVzOGvGgUsJEVXM6krRYGtHZXQPzPv+CMFHMCT7jOl8l+8+6ZVmduswgyGJzYUYkol26drLIgJnF+o7zgyXWK9vVQWtNABGTG1y5cDffO79nv6bOQ= X-Microsoft-Antispam: UriScan:;BCL:1;PCL:0;RULEID:;SRVR:BN3PR0301MB1219;UriScan:;BCL:1;PCL:0;RULEID:;SRVR:BN3PR0301MB0836; BN3PR0301MB1219: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:1;PCL:0;RULEID:(601004)(5005006)(1201001)(3002001);SRVR:BN3PR0301MB1219;BCL:1;PCL:0;RULEID:;SRVR:BN3PR0301MB1219; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;4:OG2zgmivvKlptqiLnoUI6Tc+9LAxjaW71iXQn/rffhqvoo6EmMfgrU7J6I4BMdzl9m/5anM+tzyDZV47NTbxdRWR1rT7hdz3SjwoIll6HxWvYrOci02PUtuJFW162vB77u41MB5QMfMTfUuoVJQ8IY+8gjV0LysVIWdQfLaV97XoyHu+ZMG9MOS2zhM1vyYnvDNe6Kt1l4zlz0xVrx0xFwUo6uflxvLb5zVcPTWhZe7094MLLsp0K3tP+J5yncn6cb/Tq2Gt+m/+mjEtzCzeEOGfzY69o21aoy+SxoDEJbXWQOAv+1yrbHPx+ZLpmOQc X-Forefront-PRVS: 0636271852 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0301MB1219;23:ns0F0IQuY8+//H9oX8Lg4lC7Kc9K0OR/4pk+1O5?= =?us-ascii?Q?kRm9dZn8JYOhGlVDbPft990IvZz1KUO1UAC3dv03EbEH3I0KCdOo/p0ZrpDV?= =?us-ascii?Q?5TGOGyoh6zt8alsD1ZRG6IWaZRhHl0dHLLeCVWMnd4xPOpDSR+BE+0r2MaFG?= =?us-ascii?Q?D2penbCaDOmcFI9m5cg4kLM0mskIp/Oc6SdypDcCZz9V2gmD5yeig01xlEhT?= =?us-ascii?Q?YQT6Fhq/Pr3iR+j21IylK+bH7rdLEpvsUVJBzOiCrpwDCWDYwOsUij/F7Rm8?= =?us-ascii?Q?ETiVC22fq9vPpdoxVs+TknnQuD+MXo68tLLKyu4ke3hbGaQCNYp1jgJKG7nW?= =?us-ascii?Q?TkxsB/yKM8sA3qmFAMYFpcJhfmUCGIVSxcK/EKDMdUPtzq2EM1goTQe6avWg?= =?us-ascii?Q?p1fDSoqKV2jHfCh6Xe8NKhTuRL2nVjBAm3tAdit2e7oWtzxwDBwivp7Dw7Md?= =?us-ascii?Q?gvH9/E5/jmKuzQMnMS2z3qjeUpMmxue0FwoGSBGHUuuEnqOl5ihu23HLkQBj?= =?us-ascii?Q?kb+r2aEMkSSHVAbbDb9Re0du02Pi5Y7iRYhA5ep/qjl0BSN2xroPX1NQ/mDW?= =?us-ascii?Q?XXipTLoUXJlSEQz4mqrYkOtux9H2coLrqGdUnLoSIuiuuzqYYTBAzNFtVP6C?= =?us-ascii?Q?Ink2+pmSfYCXxunfA94DybMGkV4kPcJDM1zi+RhccOijwEWom04BskqkycQ8?= =?us-ascii?Q?EszOgdtVipWpD9HRoyZJ/0dMbCGjgk4GuWKrPja3rdr7wr4ICERtgtbiz7E/?= =?us-ascii?Q?l97R4QmKaw0WuqbNWUpvJrNHbrVYzChqzljKnDmwLMU6tdc6elMXKDDF8A/8?= =?us-ascii?Q?J4k6sM9sJQEL/7BvBZrVQkO/nsyBSQNfHFgp2OIDN8rgn6hKwNHtAuJcoLU5?= =?us-ascii?Q?T9oOfXz1mpf/7v+w5KkmXMAVPkkZa+VXNBd21+c+W7G9ezYyRWQ9v41ovphB?= =?us-ascii?Q?sCI39DtyDOHq5REEX9DqNCXJUpaA9l8o8Y+Q5O3lNPykLhy/BySVH8wdQJpR?= =?us-ascii?Q?vxEmJRJJ8CPnU2ln2VgXyDTRz?= X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;5:Q71onjjTRdtBGS9Q0dOeHtsdgC5hIonDT1xUzYEP4C0KQ+CAfj4PDefFKsaGP8kCBrk6BjlJipo7DYPiaV1V9IY3Z5LQ0KC7p1dJJiosO+5CONUXgh8rcdfOWLq/oArEpcbaHTmBjfQXwTgnokdg5w==;24:8ZVh9X8iVh5Jl3LKVvc+ncazDRp8ogGhTu9q8YcFEcyad46HPi/tgQmUDqb2K5vPIIinpQJWqGpfl3PXgoBDVkG7gunyNk0bo0CCGNHUXo0=;20:i15xnujVxunyRdesNfc8AoJUhhUJS4Z8TcAxvz+tLk309ni8L7gySLJ1+Nfv1AE50SeOSkfurJEW/aCiyOOYBA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2015 03:07:03.5925 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1219 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB0836;2:6ZMJYGETmiKwNG+Ix/4WVVue0AMn6Kj1rEsMkEaeuQo5E5MFxHKB8qKGtuQBmWgw;3:cDXTsMTmcjMsyQ0/z3Yvo0bdey0YzGNuf/ZcsEQK9DIS1eMi5cXJipcyyTDEP8uKhTS5qIX8A3kfLCTdLgJkqvyREAi0NbZOF91nDPmI37vT5rcL9K5RPglPhWuutdTssjlKYwxM+c7QUPZ4I9rT4HESi5BMjIJeGvGUiiTx8ZJeaVjf0EbbkocUWJ49uTQc5xP/6wgF/fxclHA5kr0x+l+l9up5JrVfCz27/CZlzbM=;25:LcBOdv+pmA9ToxPeiNdBnzjc33rvIuNW+nQsc5S5A29z+vloBlAtzyNMt6ubsKILdWOIdO8xiY1Bx4dCpDHuPf4CgWiZs+eco/JUaJ0qkEcmD+BbbmWirt7b6qrWbhvQF+wKABl/TqPgAjcNzj5wNhG+XyPDAtrV/zpvhR3S6SNAZQ23WuVL7PQaN0yP8y0R7tgE9Z2+5WBfgKIn6VGZBJaE5rQpnC3EQxAvy6EYIfwTyp8I3bd+tG32RIn/QKshXFbAw9paw3nkR+8zaD3HbQ==;23:glA/9g3kqNw80jyFcmazkJ+H3QqNUFZEsrljFwqo/97iKORFztrNRg5oel2goGqKsZ0sRRv2SiDIxIrAkyBF6Y60UmMQaUxrr0Ppxa7lm1jJLYXJJriUBi5nCorjchhFIz7seVU0GaCK+JxFT2GaKyvn3Sd3vP2lZD3TlgVuUpGTSEU8aLLRq6/qq3PsGGg55xzGu8q7ivrapKEttEX9MEe4O6n1LzmGrQFWfJjLsZGdYEAjY4lWvIy0RLwkwdCT X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2374 Lines: 71 On Wed, Jul 08, 2015 at 01:19:30PM +0300, Roger Quadros wrote: > This is to prevent missing symbol build error if OTG is > enabled (built-in) and HCD core (CONFIG_USB) is module. > We may let the OTG-DRD/OTG-FSM depends on CONFIG_USB to fix it. Peter > Signed-off-by: Roger Quadros > --- > drivers/usb/common/usb-otg-fsm.c | 6 ++++-- > drivers/usb/phy/phy-fsl-usb.c | 2 ++ > include/linux/usb/otg-fsm.h | 1 + > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c > index 1873eb3..156fd25 100644 > --- a/drivers/usb/common/usb-otg-fsm.c > +++ b/drivers/usb/common/usb-otg-fsm.c > @@ -166,8 +166,10 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) > otg_loc_conn(fsm, 0); > otg_loc_sof(fsm, 1); > otg_set_protocol(fsm, PROTO_HOST); > - usb_bus_start_enum(fsm->otg->host, > - fsm->otg->host->otg_port); > + if (fsm->ops->start_enum) { > + fsm->ops->start_enum(fsm->otg->host, > + fsm->otg->host->otg_port); > + } > break; > case OTG_STATE_A_IDLE: > otg_drv_vbus(fsm, 0); > diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c > index ee3f2c2..19541ed 100644 > --- a/drivers/usb/phy/phy-fsl-usb.c > +++ b/drivers/usb/phy/phy-fsl-usb.c > @@ -783,6 +783,8 @@ static struct otg_fsm_ops fsl_otg_ops = { > > .start_host = fsl_otg_start_host, > .start_gadget = fsl_otg_start_gadget, > + > + .start_enum = usb_bus_start_enum, > }; > > /* Initialize the global variable fsl_otg_dev and request IRQ for OTG */ > diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h > index c631dde..22d8baa 100644 > --- a/include/linux/usb/otg-fsm.h > +++ b/include/linux/usb/otg-fsm.h > @@ -198,6 +198,7 @@ struct otg_fsm_ops { > void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer); > int (*start_host)(struct otg_fsm *fsm, int on); > int (*start_gadget)(struct otg_fsm *fsm, int on); > + int (*start_enum)(struct usb_bus *bus, unsigned port_num); > }; > > > -- > 2.1.4 > -- Best Regards, Peter Chen -- 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/