Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754522AbbHGGpX (ORCPT ); Fri, 7 Aug 2015 02:45:23 -0400 Received: from mail-bn1on0140.outbound.protection.outlook.com ([157.56.110.140]:36256 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753549AbbHGGpV (ORCPT ); Fri, 7 Aug 2015 02:45:21 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; lists.linuxfoundation.org; dkim=none (message not signed) header.d=none; Date: Fri, 7 Aug 2015 13:34:52 +0800 From: Peter Chen To: Baolin Wang CC: , , , , , , , , Subject: Re: [PATCH 0/2] Introduce usb charger framework to deal with the usb gadget power negotation Message-ID: <20150807053451.GC13200@shlinux2> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD046;1:pyf2bxOQVUbB2QddcVtgJTWWi8nCkbXmC/0CwVIRhA5OpzTbKSZeb+fuFXYdDI8b/8gPK+Pak2WmSF4L0QnyzcWewBewmMdve8Gw44zfhuQQpzLSDxWVTw4Buf9a95IBOkqrQKmyRS2H1eDtQN/0Mna8KaEVxYPAQ8pMEmsuqaCKWYdIgzB7VI5Sa7A0fLEXT4Frzy/BfI/ju4OzgzGId5lrIgqyovbg60SJEJW+YWHwKmfS1PiGB14vtKv7vnSied01XlycmDxkGiY0ouU+oIZuM2GUHmNUKgm67tQgJA3aHZxUAMqGP3Q+WwB/sWC/ 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)(52604005)(110136002)(33656002)(54356999)(189998001)(50986999)(76176999)(46102003)(83506001)(50466002)(87936001)(4001350100001)(81156007)(5001860100001)(4001540100001)(97736004)(5001830100001)(62966003)(69596002)(86362001)(77156002)(85426001)(6806004)(97756001)(23726002)(33716001)(106466001)(5001960100002)(105606002)(104016003)(47776003)(64706001)(77096005)(92566002)(68736005)(2950100001)(46406003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB1277;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1277;2:byycjJV1cbWIe4Gz9uYUHOzPxFdVI8Rh9EZzOUpNFbLeAbLCilTUJTr+N6cwN8HZvNqh6tLXWQ6uTq0LvyBKICKp6742DTquE9+4sqjRpLpHCc2ie1xhltJ7eMiB9D3MLQSw4fmO5wyi/RFA4bSsi03zE4MC3P85TZflYcebea0=;3:V91bMVnMHbgEbLvclhykvsKmUhBDi/egT//gMPsjysYfB3sgIt+VdXDYf0CHmTpwkHzV3qAPAWPwrBv1flPHNGHQqYgM4tpsHwHuDeWChOeDU3vtGUTabpsF685UckzGmxupoM9FYPGFnAu51OZqadMliWGyFjhTj/wAAkgaNwCU2oI+gvVMrZ5GpgGBQ75mkghFCT565mC0SR0gqMzBXx5b53aeU3C3iYjqGJMnP0s=;25:h7IYIVSYJZ460ir+xLweKiH3QZJArbTgox4b36gfuqwYdslgn/xkK2gBDkpTY7AYIWmJTnJVv98GJqAtND9JuUhMP5ETeH2hmrhtruIHoodctZzf1D5s5SCTSYG7ih482uztMydT15+26PQ8QP+C6rIu7xF6jTfk5yM09tv3HJLGuP7fkwqovfclF0moSZ2rSAL+tmvTgDEYZSS68dA+pl+w6uLQMXXzoNkTHFMabVMqaK9LTWfNxKdceJYtX8VR X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1277; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1277;20:vq49bdlyzbIZDoOnnVY3E6rqni8CQgQwdJT6n/YKYvxy6Mvk8odfpoT9OJ4UpEwiwW7RJ+hZdADe6BE3MKVyCWx7q8Mkhv434oA7NDEp/DaN0GJQsqixv9AbIyaiJQ4Ce0tNi5oZvbR8BzOXxZktOazkWahhW1TVR2HrlqLAdzwVY1W8h191Mg3KqKufNQfGIRsxnoSrUEMJVtMAMPLwaLkoYaEyDZ6bkz4Dqi4sP+IDsMZqDvslT0bqJZqV5Jpqj/eVaM3ETHGrfPpefD/SlZFU1Pus99JSBAZZIEoDEfdMhINHUo61D76V30p4EPt2dyP5YORPkKNZ4CRGehT43iXqbqNRXWRPXYh8TGhfJtQ=;4:I9XA+/xvNqs0yj2SSK47Yvz+8f9dAJdjxgpcKmmpebL/57MhSeQ1ZBYVXWwIWMNB0Afs8O4JyfkgSbBlLaLup9Qglx8eFrhMgdYdv1hb95enDehMGEv/L0AU5UvQl7dbfGtFT5bZk7fqjLcpLKFmCYCr7IguBE5VNKfEEfd6sXMB9CeEGZCwQUDvLCN0qAL46xS98bsJJXdk9DoZ4jG3cwYiKxLQ38ryq3vvJKqUCdw5YiG6Rqc5eimB8j1D2puqEJ5Z6iF+hrCwvTlatLr5x1t+7FluFBTHf3XvSy4JPAA= 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:DM2PR0301MB1277;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1277; X-Forefront-PRVS: 066153096A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB1277;23:qH2555e8u52KVaLHaOfxfyzW1n0k6023l0Emuy8?= =?us-ascii?Q?TGUcisMzp+0caLhXgUgwKBAlIZvw15/3W/pdeemYDY8/Ma9RYM7t5OPQJN7A?= =?us-ascii?Q?SH4om85PMUst241w4t9/nj+qdEDW6XOm+rpceXjK0FaXES7AnICHRZsk+Tlq?= =?us-ascii?Q?IAfLrYmC8NJVyJwAP/SENgcSHdib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9eNsuFtv/l6IyVNhKOs8biMaD5gSQq3Hyt8J91g+ruCCsAXGT?= =?us-ascii?Q?5iYf00I/qlNiqiV/1J8gK3KwdKd3AfAP0?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1277;5:t7Z7Ux4y+D10m6WwBq7CV2Q4wSVZbp88l33kP1fXHjDGI1jqRmzuoKoYRIdED2FrA7Q5UQwwy06zW1DvRpSmkVOfUrBPts2trkQwuBoN4798cKoazTZPdCYE07s0TySb3caMYvllETLw8msVt/Yurw==;24:xl88GXFi73ACYJ/93ohJ5zeGsoxQKE3SvQVVgerpCAKkaOMCw/OOWxDNSPLUMR2y1PWBsuMSdHNFVCafByb97q9R5SxG/25u+3K1aoMztUo=;20:MIYi4SeCCcRrCXBzjHCek6R6ZDjx59tP1aaeVINEkuMf2bVcb/xocoyfMTb8SHve0AVw1FsinY3b/h5C0rnRLA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2015 06:45:18.4079 (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: DM2PR0301MB1277 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1589 Lines: 43 On Thu, Aug 06, 2015 at 03:03:47PM +0800, Baolin Wang wrote: > Currently the Linux kernel does not provide any standard integration of this > feature that integrates the USB subsystem with the system power regulation > provided by PMICs meaning that either vendors must add this in their kernels > or USB gadget devices based on Linux (such as mobile phones) may not behave > as they should. > > Providing a standard framework for doing this in the kernel. Baolin, thanks for introducing a framework for doing it, we do support USB Charger for chipidea driver at internal tree, but it is specific for imx, and still have some problems to upstream due to need to change some common code. One suggestion, would you add your user next time? In that case, we can know better for this framework. > > Baolin Wang (2): > gadget: Introduce the usb charger framework > gadget: Support for the usb charger framework > > drivers/usb/gadget/charger.c | 547 +++++++++++++++++++++++++++++++++++++ > drivers/usb/gadget/udc/udc-core.c | 41 +++ > include/linux/usb/gadget.h | 20 ++ > include/linux/usb/usb_charger.h | 101 +++++++ > 4 files changed, 709 insertions(+) > create mode 100644 drivers/usb/gadget/charger.c > create mode 100644 include/linux/usb/usb_charger.h > > -- > 1.7.9.5 > -- 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/