Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932426AbbGPCQg (ORCPT ); Wed, 15 Jul 2015 22:16:36 -0400 Received: from mail-by2on0144.outbound.protection.outlook.com ([207.46.100.144]:24192 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932385AbbGPCQZ (ORCPT ); Wed, 15 Jul 2015 22:16:25 -0400 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: Thu, 16 Jul 2015 08:54:14 +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: <20150716005413.GA25628@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-5-git-send-email-rogerq@ti.com> <20150713015759.GC27710@shlinux2> <55A38F62.8010509@ti.com> <20150714003427.GA31197@shlinux2> <55A66073.5010800@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <55A66073.5010800@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC009;1:oF6DNUdpAarD3sBLROxCfHFuRaa02LDdO3UAJqxz+HoJuIKFJJRS3EUnNJA0PyWWx3s1VgDxwbrZP2Pw+WgtcUQ/lvAmNPfKYNMEvr8WKcwHI54WAbTDUZED6T5HDt0KmZRyWXvulrO17YXTqcL74z9xwzceSbgtLdBCzdTcLxXYC4FsVQ4hg8CFLxz60AvCg3GAaGOVgDTwWWnKhPOmvNoig1pd+uUAwrauwt+MO68PpqplC+B3gGX540n9jEzFolIvmCDIYqMwVNSAl7VgPoaHiNeQOYzk3JD1Tps9NScXC4MGYv7iUtbcxQhsEyiB7yJgGGTs2XPV7+3AZcszdBu/OTMnU70OBYF/HlegQfJ6TO2XYDALK81Ov635UrdnhJ6rwVGbW8SQzs2zJDBVQpITsP6Sn0lzKR5FNdKqMkmcOwjTsTl9TzyoDzR3cxZF X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(199003)(24454002)(479174004)(33716001)(46102003)(46406003)(93886004)(77096005)(33656002)(85426001)(83506001)(76176999)(54356999)(50986999)(2950100001)(104016003)(97756001)(62966003)(77156002)(106466001)(86362001)(105606002)(23726002)(110136002)(50466002)(5001960100002)(189998001)(87936001)(6806004)(92566002)(4001350100001)(5001920100001)(47776003);DIR:OUT;SFP:1102;SCL:1;SRVR:CH1PR03MB612;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CH1PR03MB612;2:BP4i6F9ET3eo0Vo8RwJpWwEV5H+lG2h5SBQojjhC3ULhim+2E+KpbaZn50QmgP2c;3:BOIXfTIfOPzYxJ0hB4qtjQKgPj+Fi5wAbSv+rY/quffjMIp04d3rNpqnFUW5nRffXlMSo31oYMDAEL/6MENx7I1ePS/zU5bwLcMJljiHZhodvMfdCiRXoRUG34+8Lkbad8kxUrvUw1qhUeDRBBd9TJZfM6Un/zdo69AzpsMbwZSmdI8rz4b0rps9TGJp8jgpdg4A+agEgNPoJKpbhs8ti4Nfw/93LQUtCrwA3hynUwQ=;25:uNoFvk1RL3GZlxLt8t6uwdeL1iiLmYZwIgV/sf2H8K9s/MNkJ4zEb6EknfTypSSb9JgSlQzPi6srh+g/MQVe8JegmDhlpD1HEXXRWA3PZ8qz2N7tkUvx/Ib/qVQPFCZb42JDlpt6+wqfDPt2ldVSmRoGI7v5I0VtZJPrnAhQh8lHPzrwP15PWnVKc49EqcMLb1s3oTekY1azhQvPqV3wRdrIyE1ueBKyqNple0bd/YQN15mISEeXU2IIeEUuV06HKojhd2Y//oEAYBEKiXBM0Q==;20:ov0B2hawvvI7JLPRh58+q30l790GE1gSaLOtL8BaYza1M9xjqhGecgRyoD+BNzzROc76JZa1Sw+nN8wntLsuVq62UivO2VsF3URL4PjHl7HvAbhbPZ7FG7yIYg/2Q991/KE4N5wUF8/Igo4Vc1Dm2EkmgecbFhgC6KSkRLbS5OaYo3rLDWMbZ5oXQkPkPOJ/DpkjY7zNYXm6gL4ws3GMazGGcnbLP73U9aObGxBsq6lcPPI1S5b/deOf/3hicEvlK08s8vQADtb9RJh4VqPkdivXCnzg11eBBceolXLAVQxWAVKYgOX6ABQP7fwSrd5OJQjLVY4rPeACASj/+s5wIrgV0isbM65yQ14X3LOVvpw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CH1PR03MB612; CH1PR03MB612: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CH1PR03MB612;BCL:0;PCL:0;RULEID:;SRVR:CH1PR03MB612; X-Microsoft-Exchange-Diagnostics: 1;CH1PR03MB612;4:RDjfGMttk4lzmrdQylkPkMJ6pE7BbTJz87fZLdJ+uLtO1GP6tCaThCUwPC46HZ3eYccT7d7iiQ7r0hBtyohmq48HQHFOU9RBq0oa39jY0oPpLzWkSghci1QzeD3g40+T0BGEOfp1x5ozJ4YjZK4V/skSTPVcFyBGmftCmN1QpLmXhlqAJcfmMabibtcQRmTKHVyUETP/SHZRfBMuUklCNjkspuNFmtln/qKoJwdRB892N4gdOVDOm8e4/m9DLBo10wtilHlcyxSciyf76SRWXn15SN204moGTxYAvSNI1HU= X-Forefront-PRVS: 0639027A9E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CH1PR03MB612;23:3ylaiCPllKLA2eAXMNRl0/l7CdG7wZRMSrJaDVuSxZ?= =?us-ascii?Q?shus8N9TZJIin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?= =?us-ascii?Q?MG0FnNEjk1mi6hTRLQ5A3aVWEbmzpQdUshanKpwNZfHnOR50DH2TP5xrdoxs?= =?us-ascii?Q?c=3D?= X-Microsoft-Exchange-Diagnostics: 1;CH1PR03MB612;5:pPLghDW8sXCA2gNF1kf4vGR+7O7ySCof6w10mzniypBZ7J6Dgmzm0b9m9xEk9gHvuNu5RfgzwnGbtBJX7xwfwhZfxdVrjuYoZU/F91uOYN3dSkCvtdKdKM6vhFCVUdx50KWxi75vGBjSaEpX6Nh0Xw==;24:ab7hnYpBv/rbpcJnP9sOboFjboiFJ8ojheyymON6iyc59BrF/o3/wSGjhHaprijkWGtLDD1YbrXfjkIMjRMoG7MQ7VNQjeB4dvxWQ8JdqBA=;20:yEYwrFWp3Hh7PnE7cdu0aszIhAnN5Kp+V6PrBdnLdiKv62is61NVxaY0LNUqC7q5NrvWRrZ2uRwCJ3/1e8WJag== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jul 2015 02:16:20.9212 (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: CH1PR03MB612 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2317 Lines: 65 On Wed, Jul 15, 2015 at 04:30:27PM +0300, Roger Quadros wrote: > On 14/07/15 03:34, Peter Chen wrote: > > On Mon, Jul 13, 2015 at 01:13:54PM +0300, Roger Quadros wrote: > >> Peter, > >> > >> On 13/07/15 04:58, Peter Chen wrote: > >>> 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. > >> > >> CONFIG_OTG already depends on CONFIG_USB as it is a sub-option of > >> CONFIG_USB. It doesn't depend on CONFIG_USB_GADGET and that can > >> be fixed. > >> > >> But dependency is not the problem here. Symbols not available to > >> OTG driver when USB/GADGET is 'm' is the problem. > >> > >> e.g. > >> CONFIG_USB_OTG is always built-in. > >> we need to work if CONFIG_USB is 'm'/'y' > >> _and_ if CONFIG_USB_GADGET is 'm'/'y' > >> > > > > below should fix this issue, but we may need to make some > > changes for code which are defined by CONFIG_USB_OTG. > > > > diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig > > index a99c89e..5e374ad 100644 > > --- a/drivers/usb/core/Kconfig > > +++ b/drivers/usb/core/Kconfig > > @@ -42,8 +42,9 @@ config USB_DYNAMIC_MINORS > > If you are unsure about this, say N here. > > > > config USB_OTG > > - bool "OTG support" > > + tristate "OTG support" > > depends on PM > > + depends on USB && USB_GADGET > > default n > > help > > The most notable feature of > > USB OTG is support for a > > With this USB_OTG will become 'm' when either USB or USB_GADGET is m > and will break if either USB or USB_GADGET is made y as all OTG core > API symbols won't be available. :) > Ok, after thinking more, seems we can't handle properly if USB_OTG as 'm', your idea that using host/gadget/fsm->ops to call hcd/gadget API and the controller driver will defines these ops (due to it will use hcd/gadget function) is proper way currently. -- 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/