Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566AbbGMDZg (ORCPT ); Sun, 12 Jul 2015 23:25:36 -0400 Received: from mail-bn1on0112.outbound.protection.outlook.com ([157.56.110.112]:33266 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752503AbbGMDZd (ORCPT ); Sun, 12 Jul 2015 23:25:33 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Mon, 13 Jul 2015 10:00:25 +0800 From: Peter Chen To: Roger Quadros CC: , , , , , , , , , , Subject: Re: [PATCH v3 05/11] usb: hcd.h: Add OTG to HCD interface Message-ID: <20150713020024.GD27710@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-6-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-6-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD025;1:xq+irf0+Sf7aWb/Qhzw3f3XyYqa47NuRS95Qu4V7Jsk9xw+fSwm8qkaWqKOUcM2sSrrrLvS9PtQGWoOgCcbm9BPtfLmcFqny9TjGCG013xK6SJodlXfzF8pwGsUEikr3LM/mWqqDG5Px9+R9yhhs5Vu5479hZCkB/xTxP6yF21xEIC3Ar3DLJ+Nayw4BA/71XVfhhqCBDvuOtZbDAPVRtGvF/JMCywfdDKHZi9VMvQrKW4VMS6nmL3Kt3tzCKPjQwpaBgkDh3+4zswl+FWJD26kXksuHVijHKc2SSz63PFpoErCBSxWlNAUEjSpjpcWYdtm0pps5zLhH4VToNZBvwNkWkNlHXLtlrZJqxcq34ovE78u7xcews4j699GBZEdoXy6CCSBfWz0w+SVh21LiytA+l+F1ZuIRJiwxAtvLVv2lSlE77OdR+J8POkciIbejdHyq0lXca5z9axdNNNyEKg== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(1060300003)(2980300002)(339900001)(24454002)(51704005)(189002)(199003)(85426001)(86362001)(97756001)(104016003)(19580405001)(110136002)(33716001)(87936001)(6806004)(19580395003)(50466002)(77096005)(62966003)(77156002)(2950100001)(105606002)(50986999)(5001960100002)(54356999)(4290100001)(23726002)(110436001)(92566002)(106466001)(47776003)(46102003)(46406003)(33656002)(76176999);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB1226;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1226;2:NgYYfarYiStAfFQwTl0Qx+N309Cxix9OsdiOuIBo+670n/LozHe+syxTfadOoseX;3:Xq4YBDAXGtCpsERqe0B1GbnghaKXxnWqr5BNEDk+SVlVONLMyVaRajy48UZv9LoWgLUHDBJfp5CamlkjNPIVsarYIAzYETblaQEhoTSJ9Qi8/GDAg8VqNSAw5cNYLBJ8n3v6jscwkuQ5Do3I+PcWs/TmP4njpUXL/t8jpo1HgDDs9jacYWUZqFO++Z+NQCe8bENza3OSyWy5Ii6r1DV0Vqyg9kQTDtsRcAHQZcH2B5o=;25:QTQihgsPEUwHgP3aDKgNtaQz9yAoOh1PjoEvT36IVvNHu1jTeMtDZA2Tg12HF86NefiG7PsTWRP4HjR0YajyEANu1fMekyTeGvSP6Z0TUd/hzmB22pZ7k3u4eNMFQ/Yi+BqADm6r+gn9l35JIHt0Vj2XDYZGsntjf5Gsm/o2dduf6eYyx9YMlbIru8VstZjQfNmZn/VAoJPt14qqdOsY8rmR/vROlww1Wd0I92oIYD+ePJoxLMYQkdblImc3aOnCd3qnF42nTjCgGOTNyrgnSA==;20:SFcI9YKiAqr2Apmabxwm6NS0MGkqNvWY/T9EZx1gjG5kEJk19vGtQui3UXi1ldECXoAFUawSBARHSCXXI9vdOI2s4VyO75w3q4m6XaYKrKKVKGcAn71SvA5y3Uo3mTXa6zNrBqGYf8Cnw2SXsY7pYUy60E64jL4pGu8c38jRwsJmMgCdor2tMmqtxtsK3et/iOodNYK9KRUyQEX/44SluoZofSog/MUbZwtzy9v1qM/1q51YsePYJDpM/lRzMMT3rAvu5o4mysX7yB0q4hE9Uz4pb5haCLoCaKtV69HJtAW363yf2hnnkQbqBu+BQSthsMBb6PEjxmIDht0/viW4ikaURHAvCRO2nkdFpghXBs8= X-Microsoft-Antispam: UriScan:;BCL:1;PCL:0;RULEID:;SRVR:CY1PR0301MB1226;UriScan:;BCL:1;PCL:0;RULEID:;SRVR:CY1PR0301MB0860; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:1;PCL:0;RULEID:(601004)(1201001)(5005006)(3002001);SRVR:CY1PR0301MB1226;BCL:1;PCL:0;RULEID:;SRVR:CY1PR0301MB1226; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1226;4:quU0v6oaUS/RCyquMv2s+Yqo5JQR37HJr3R3qyGeeTsyR3YWtUWcctK31XbvyvkJNGb1v55URA/VqAw/UTLYNAlvVTKASXwYW/iOQqUAmzknXdteP5RFsWg5IQQ259k+6IoBSBIwNeVUUv5vOi5AJBdHl2O3TLgGYGyXKxoChF0zvfq75dRxHZnnGbx13HfOdpAHFeZoZjIlyLAmrkwNX4vLPFqnGMb7rBgOOfglbQY3+JPt/fNes7giPQjE36gii38gOwsz3ricQRGq0B/VC+4VNeO5IZDelIr+qTBL+D+j3RakqvEO7jEXVms6pCPb X-Forefront-PRVS: 0636271852 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB1226;23:BVUj9B7VUviUGM6V8VhfLSWKbfpi6BU4oNo94Z3?= =?us-ascii?Q?PzIjMdgjiWk2vTHV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Q?FpeJfV7SC9yJ9iHx1R0gUWcQvXassCtB5pUUpC4r6QA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1226;5:h+vNCFZchpm33wQr60i4McF0wYSSM0cpDeHBdfj5Og6nrap9BeecaWnKl6/pb99WcT7nJD04ZRAmLaZKUnYHGIJmkfMJqLzsh3PzJvQ2B0pegSpeYPSHhAZcoxbpQ/NaWeEIxrgrZbdVvL10odoqzA==;24:XsR9OILQJZh5ZEtGF+Tj9oju8wIwiTWXYs8DGC5PxcTuz5INTp3/wKu+BdibPPN3V8f5WXIj7jJcea+ZuDiLjuyXjYk9JC8Hu8LtzPAL8kU=;20:FwDakLLrbWEq5PhTRnufIpewxbYmTj5YvCA6IjLD21NbJAK4fQzbUxgrG1Q0rmwppBnI7SiOdaglB9d5ICJCpA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2015 03:09:29.3748 (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.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1226 X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0860;2:/+eCbp6BP229Tn9J+ux87HCXM/PiYbTMuydOCrpBRkfh9twGUcSJBqxViTqRfq5M;3:jOS/AuI9eSzPdW/+ODHZ053gdIumf8IHFUTMZkqljVHt/uSSnKoBGqIEiMWJZOjMBCopCQEqVvqe1ksC4apNhXmYcRjB9arDglGsF76tlIpK+4sPrjuEzOPTn8QzOx/dmZoYYh0sgMS9hNrKSdCohYHLHtfZdV97I4EtfWPsD2i3dx+1vtmDl1CfXGLL22fsmzDCzX4jntw1G4plaPUgmnPUT+C+VK095xo8k+zkzz4=;25:j4EWCk6J9ggvXQa2esOgwyWlh2gZyKtd0jp60BKbN87wptl7Egnh59W8wt2a/pcM+W3U4YYZPRE0pbLWDrCE6zQDAo0bodKQKRAJ4Dayt5MbVEHNptCgWSTVEmSjQjtiBrOJ2SP5b8KXdHj0czKAKwj7qYLnAufSxjH3EKbuKBRGve2wrSpEx8cT8+ILoLR1+gwIKg8qTx7vpJrrZOt3mbAQaZpTYZjkA2oP30r1goFM5MLguywB53s50CQlrxo+hvYmLlu9DIG5FgcNU/kZhg==;23:+xfl/tljSnCBRiFMtD7eWQVAUyHLk5Ih0LFfsjhOWfpYeZOLSKh0v55BXacd7FqOk3NYHUX7CHl4x/Gr1VaLA/kyCQInM+9e3GS7E2Dr7jJJ9qbl2bECPFEc6lsyF2ONSW5lSYfRjJGlBKT9MTRbVuMuArwAChZRl1Z1pjBBCxzyMrGgNz9KUGEjXha2JAy1TJRGQCtM/JWKMjE2QxULL1zKpXSPJWO2UoXyejHxTytWhIA9nSS0QR1HcRqPiZ6z X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1601 Lines: 58 On Wed, Jul 08, 2015 at 01:19:31PM +0300, Roger Quadros wrote: > The OTG core will use struct otg_hcd_ops to > add/remove the HCD controller. > > The main purpose of this interface is to avoid directly > calling usb_add/remove_hcd() from the OTG core as they > wouldn't be defined in the built-in symbol table if > CONFIG_USB is m. > Like patch 4, Would you let the OTG depends on HCD? OTG needs dual-role, it is reasonable. Peter > Signed-off-by: Roger Quadros > --- > include/linux/usb/hcd.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h > index c9aa779..4108288 100644 > --- a/include/linux/usb/hcd.h > +++ b/include/linux/usb/hcd.h > @@ -386,6 +386,20 @@ struct hc_driver { > > }; > > +/** > + * struct otg_hcd_ops - Interface between OTG core and HCD > + * > + * Provided by the HCD core to allow the OTG core to start/stop the HCD > + * > + * @add: function to add the HCD > + * @remove: function to remove the HCD > + */ > +struct otg_hcd_ops { > + int (*add)(struct usb_hcd *hcd, > + unsigned int irqnum, unsigned long irqflags); > + void (*remove)(struct usb_hcd *hcd); > +}; > + > static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) > { > return hcd->driver->flags & HCD_BH; > -- > 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/