Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753459AbbGQBkt (ORCPT ); Thu, 16 Jul 2015 21:40:49 -0400 Received: from mail-bl2on0140.outbound.protection.outlook.com ([65.55.169.140]:62592 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751976AbbGQBkq (ORCPT ); Thu, 16 Jul 2015 21:40:46 -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: Fri, 17 Jul 2015 08:31:27 +0800 From: Peter Chen To: Roger Quadros CC: , , , , , , , , , , Subject: Re: [PATCH v3 06/11] usb: gadget.h: Add OTG to gadget interface Message-ID: <20150717003126.GC3609@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-7-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-7-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC006;1:rAy/gOl1t4eVRwywWYI1lKILOLG45cjHMYCEj8CsiEt61bXWrrREFOTbNcRgihIyJaf7iK4RWQtDbIexlEnbb5gVQP0J9l1RVlm5biwLVdAuAy5B6oBur5mtl0nD9qtph94o1N8uNFdzoNT46yfmOJQ+pAu+3B3ORr5w0yTDJU8Ebjg+CdDtv5rG0VGZAaE3t/EBac3zicQtepP+wEpgj6EOaRf6S4Gh1KuSljxhhWqkYNSkC9ycTOwSZRReD/ECTlh1sUyL3kQtJJd97OO+g7IIQbXKNvlarKeyP+6PihzhvnOEJwI+8CNk1KKAOEo+D7y57GDs8ZEnrlTMORtHSLgfE2fS8kFStex+5Ep1ATdR5mwrmpKfTKoKxwZPIjMRI0S1U552+ewb8ZeXYmJegt4C9NmuoxbV6jqOjZsndzoC6erBaDYICyelmsLR3bYA X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(189002)(24454002)(199003)(110136002)(189998001)(97756001)(46102003)(54356999)(33716001)(5001960100002)(47776003)(106466001)(105606002)(76176999)(33656002)(77156002)(4001350100001)(77096005)(19580405001)(6806004)(46406003)(50986999)(85426001)(19580395003)(62966003)(87936001)(92566002)(83506001)(104016003)(2950100001)(23726002)(86362001)(50466002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1219;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;2:7+Ehplip6aBI8UvbMvijwUQ+/sadr1d9nb1Q/08ZXgN0F76Gm3ttAx+zdprhrMT9;3:fX567HshVMUpwOu/xWZgXmWkbRO5iuopA4Etv2d2Ecu5qlLyYCzZz3HRJktWjd6D1zl+xNxMwTS7VGOH18whKYIK2zsSz22vg2gontILrZsLk/lcJyEQ8iwLbQA5qnSy+lta/5skBk4m3UtIdvO0kj1g79NJz1cKPzXWtPQlQTT0jybCe3RwO2+Aa8Z2vKcv5/U1ubp7bnJqXjNLghUQpB6xFpUd3hSGMwPSQqywa50=;25:ZU1QQ8dsnO6bq5iUBJhgqZ9w/Od5Ubt0/OnUI6vtfVfiJhOC7GepBnrlDxBJORJAV4QHhgjyWmQ9vziyxrksKMoToE5rXEaDA1TFD4TO7FeQFWbuXajlwzJ5be598F8kcXkUiGZkWE7lMBiDDt9uJcHxhkHT1BrZ0TUNZOGLNS674VvuYp4BNIZu7lOPgUu6nKWECA+81wL1rWNbh1zDbpZDhd6vUNF47xSeZL/3xXRmdudWwZBpRbKRwhgN4PS/rtiPSrK4g6yb14m6+1bBOw==;20:2X6mNbfB1j5lrlWIcCtS4ccRiKDFwdQO7acHGt4zHdejbe8B/psJNCBnPKQpygYxn0Rqlk0TWLMr6ow/WOlbvjmN8ynaKaVcVan9PSySIOTSDELtqEYxiRzqMLxNfrHOL3uGjURQ9ErB3lYlzVLlSn4QczHS9DqgM6DwZqh8Pd+G5IU1Ji/9ZxJBuhYoyscUPNKj0GujoRFvdWMDTxZDe8q+xZhhfaHnXZxLHUXcGhsA4vbB3VRSlCRyXDIEYZVVOijdzDPeIMUpVRyVvzVUiuY2c9IPQlG1yYmkdxngKW0DjaKgUxmB4srW7l5gOmsuqcc81lN4m5JDJrAqmhuvsp8Kmht77WGe2HBX8ir2P+8= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1219;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1217; BN3PR0301MB1219: 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:BN3PR0301MB1219;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1219; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;4:C4Dd1AFBMbzR+dasjN40LiCGbGMKbnnFw2pJZj9VVznYkRu9anib9OJR1ktwW+7s2wUUn4IpSSELaFyDO9kE/UFkJRibjOaeytqDoHgxzeDNqVZyiyncj5nEj5NGfTAO9ngWNBBxDXmCVb2R95TSWbCSumE6DWGe4ND0kjIjqg/fmro64ZT29XtUzfrUG3VbOR48U1yD5P2nWumuSTpvOa6CKx9WBnAXFIxYv5MD1LBdCtW+WMNfHd+Zkmn1ocW9ZlujXkXu/fs2tLb1wrORDwk4eSa1ASywtHtrORb7ulE= X-Forefront-PRVS: 06400060E1 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1219;23:hl2+DT4Ab+m186Qpbgdjg05ZAxjAdRDbCQnc9pLD96ARlxWgtKHZsd8I2z3yiB0VpCF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VroLiPSsbn6GcQ/4eNBO7LRukLdRgS+gepF99UQ5sRxlcizywLLpGlWSOjoUMUTlk2/DgNlbITg3Yq0SZt/yImnlKjynNP8eNFep9CrRQQ=;20:UpKxTCGwdHb9NPeOacZRW/gq49dh3FrK5doSlDAWhSchDO8d0jyQZpyRqkE4b6ts96a0iB/6ih+FggLNGNhkZg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2015 01:40:43.8714 (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: BN3PR0301MB1219 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1217;2:XBszSIKmnrSwV3e1ftirVt1FUhQ0sbFT9T4BopfqFhU2kVWgRsr0VQMXjcjxVQLg;3:q+axfcfubR4BWv0M0Errt0CpHambqFkxMRVgyCDSaLwl5H+MFQOi1SPjU6GzIf15fQeczlPUnBexoSdknO6b1dxN+u98Y7Bnw5ycq3Yn3wKoTHnOIYqPhDVUDy9vQpwRflwLMABKUZdj0dZBtzwMaxvTMCX8Xi4CojIjQq2xqP9Fw1uVeYXO0cuBboonMfOBos/Msu/2Oq8w9Rz5+oDeUT37KUQ73OXVKpNR+a7D4Rg=;25:rzTd3sBRlNqARY//RniwO7GTIQIkxRs2My3gzJCG1KRIY8onNhdHAQWvaWRFhZG0LEcfd2s719Nq7mAS/FogDku7bhmMtGMhorQGaKoNiVzOx9fBPNoJQEAT6yFp1+pAczkygu/yNXbgESQwK+CRN0Yuy/LJfAgMh9YMjsihUMGji3SutZXpqszQgfmpfME2gjUuJ7XQIeKTH6MjEixgbzr/TmHZMm+YrpiAaIWrCz57Ih2NtX121VoQeqt4GkZH8dTMjWXwietQrUKkNjIAGQ==;23:gOqGOok43jLLtZ2sFxiPiddZnH5SR5uwrilBMEI9fWUxzLtgd3Q0GTVVsUkqFwoXY/bSoTTyBg8NXgyFOReAyKwtHD/UYzVaxWlyVjJeCYPGSTyrklPMslOBM5eYv4nQ3JMgs38/jtzavyKJdZLmH5+vx32mUI6/L4VUFM3fibFbcxWUPG9Xs+PezNBq712DFXxRQEDd1SwW6HenobG0RAgDavDukeMFEwsu79vh24ApBRSdMSz/NHgMneQRqiax X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1631 Lines: 54 On Wed, Jul 08, 2015 at 01:19:32PM +0300, Roger Quadros wrote: > The OTG core will use struct otg_gadget_ops to > start/stop the gadget controller. > > The main purpose of this interface is to avoid directly > calling usb_gadget_start/stop() from the OTG core as they > wouldn't be defined in the built-in symbol table if > CONFIG_USB_GADGET is m. > > Signed-off-by: Roger Quadros > --- > include/linux/usb/gadget.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h > index 4f3dfb7..0b4b341 100644 > --- a/include/linux/usb/gadget.h > +++ b/include/linux/usb/gadget.h > @@ -887,6 +887,20 @@ struct usb_gadget_driver { > }; > > > +/*-------------------------------------------------------------------------*/ > + > +/** > + * struct otg_gadget_ops - Interface between OTG core and gadget > + * > + * Provided by the gadget core to allow the OTG core to start/stop the gadget > + * > + * @start: function to start the gadget > + * @stop: function to stop the gadget > + */ > +struct otg_gadget_ops { > + int (*start)(struct usb_gadget *gadget); > + int (*stop)(struct usb_gadget *gadget); > +}; > > /*-------------------------------------------------------------------------*/ > > -- > 2.1.4 > Reviewed-by: Peter Chen -- 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/