Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754611AbbHQJbc (ORCPT ); Mon, 17 Aug 2015 05:31:32 -0400 Received: from mail-bl2on0119.outbound.protection.outlook.com ([65.55.169.119]:12550 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750862AbbHQJb2 (ORCPT ); Mon, 17 Aug 2015 05:31:28 -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: Mon, 17 Aug 2015 16:20:24 +0800 From: Li Jun To: Baolin Wang CC: Felipe Balbi , Mark Brown , "Linus Walleij" , LKML , Greg KH , Peter Chen , , Alan Stern , , , , , , "Dmitry Eremin-Solenikov" , David Woodhouse , , Lee Jones , , Subject: Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation Message-ID: <20150817082023.GB7122@shlinux2> References: <20150814085527.GA17920@shlinux2> <20150817011541.GA7122@shlinux2> 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;BY2FFO11OLC005;1:tR1GbCscXivribTR66wtxl67x/9p8lYUsHYlwAu+jfM4ZCqZZOEKJOmZOl9oG+/h5/zrITTMwaTfkVLc7dx61fJOizDl3Q3uVEScJrBQH1LQOWXxRMNEoEz9X/pZVGaFnYvCmAJerzDbb8Evj+/g8e0j+dC7qBO+n1bqrh4Q/hEEMf63PTQtaI1sfVw5Yi1a34EbAgqA2E5X8PnqiMh0fRGuE+DHMqtQ+xpN9CKlQW4/DQuQm02VLwz4ZMRKXIniYIW3ZI6YRNwGCWBo7jw5Do8BI0FbEdaub79YWimBwlbxxBIxWE1R/FRvMNtBpChV1504l9GL2BACCxkGahVlBXlaQVxKO5QK0OX2L2Kt3Lfow3X0GHddbmD7mhATOz5vMXkr7vUmSWn5VKv5AFqXAQ== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(189002)(24454002)(199003)(64706001)(46102003)(50986999)(105606002)(54356999)(76176999)(93886004)(104016003)(23726002)(106466001)(33656002)(47776003)(87936001)(85426001)(83506001)(69596002)(46406003)(50466002)(97756001)(33716001)(5001960100002)(68736005)(81156007)(4001540100001)(5001860100001)(6806004)(97736004)(5001830100001)(4001350100001)(62966003)(110136002)(189998001)(92566002)(5001920100001)(77096005)(77156002)(19580405001)(19580395003)(2950100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0862;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0862;2:51ES4f3DKQMHHg7RAWQfR/sTiqU1nxwCJMSyR+qVQNNUK0DXrnbSfzyCGbx5nuQvBtNfFnyJDDF+7TWpXfr1lIcCQGScVAj/PeF4WxFYMrYbI3lhT5AlD7nfSQRVtwL/ZBg5CK50Wf4ouRyQawVoijrPv1bAJi2JAftMSADBquw=;3:8fLO+IslvsO4TJ1r/QUaMnb7+L/UE1naxA6752vx5AeqHlkwiA++MGOOr95sIoh4d6vWDR4v0lEbfNsClOtZEzbBcfuQPTlkyaYDEDk8VaptgWmD72tzDvLSOsA2//BowRJ/ERrwbKCiqKIC9cbgQIvaeIOY7cniWh2bzcc55YJ/acdqKYglczbfLLzJoNxu41tj/6z5GzIdqU7QkRpap3zQWYBg8YMt2pX2uyiQpYc=;25:YdsUjO1+O3V+l0l7R+5mPH+nVZl1mf+Tj4130EuhuJ0l9ncroawNk5aWeJrqFbXjhyzyYdQe0r6M3nhTpvLXDllklDdOPmskcpAXnM3cWeH4AZjpUZeZz6JkJTsBITU6C6V5hf4NuzS+Ycn3a1VmN8vGPVgkkOSza5cnVfiZnkuGKBSm55oveg7HCQIpKK4qJoeTyCDSaxU0Nuw/NZeiRTgl/sz2y+ZDV/t7Fna7tV82oWgFKnl9fGsE/R/A6f3GV1Y7V9GpU7VJ1jC7f1bSPA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0862; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0862;20:p4+o50nrmGtEjsdKRkpRQ+sPf6MrSCPDq6tS0aNKnvwgGORCZLqOL8inP0OJRqJqTZ9fkbmIcIYSkzjmFk8ZD7yCarnBdTGkYgYfF0heK6Et7mInUvgtm3h5DOAqoXzfBeg/Qn7HfWhcYzr5l4COVf81qSV8x6H5Z9MGu+IMgI7Xid99Pzvtgiacf/N2Uzej8iqI/rG1pQW9bDwe+ukZ3VGWNsFZKnAC4HER7G0eeEP5t2xqIaSoHUEXkq0G7DiZzITwWIL9Ijqe6s9Z/VYXfEWuGIfBOMP/uuuk0TpHYsksZn/HiWiS3jvoIY68ot+mtN9AgHtw5aiJdaMWqc+OoOF1sBBg0rDqBUJp1glkA+Y=;4:t7VYoM4YGBQb3FKuVKy52cxogq094ND5kIh9V/1Haa/HjfVc1b9e7Kc1MU8Vjc3c5bKFQr2UMCXaQzTJJcwiCFQ9JzH3mnSURyc5M5l1xyHUNQEcN8cz43EXvjIBEZUxIP13rmtixRWnf7GLxVEK5Bf4FbLgWwFL/46yimU2e4iGC2Rm3ntmtgYufUfQNEaVvFp9VDQKoCzPC86Io8iws9awzC4Q2ahKIFFIHJVVbgbv4dJniw/D/2WiSyb0lC7U7gthR9cmH+0ylDq/0W1CoPjOeY/R8G5BGlu1LZsIdRNBOLkAY1rNLZsanKWBpKDp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:DM2PR0301MB0862;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0862; X-Forefront-PRVS: 0671F32598 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0862;23:wPnLIEeoxVZh3a4LSXFoGILh6jl3IFMWD0I5Q6U?= =?us-ascii?Q?xQsgcJ1x8oe7YjkY/YYjwk6w95V+lJKdMeIWKZAb0bv0sxTlbJlleTogwQGt?= =?us-ascii?Q?ZCjX7ogMt28E8LG99DefE3E1HdE68qDM0RIQ75gnBpgo2ubRORIDJZXnm4vo?= =?us-ascii?Q?VmiYEdVpfiuFT10tpIEJi2SLaPbjJMdjD9hGt+VCGOU/cOz2973RDT7Ak/3v?= =?us-ascii?Q?PkKuh5ydHWuiWwxdRTboY7LRc2OhM3qqzfVgvQ8gJbg+OLhmRqMNcT4fjVyW?= =?us-ascii?Q?7aXAj/tAM8Ar5vhrG5gn9kq5BKNMZI23Hxz+FhUMZjYiD/8zY7EGBORAgK2d?= =?us-ascii?Q?+hdrq3PHovMWP2WQDb3M53rnBV7LBWEuSDS8UPk23FY0XwL8PSYgcCN0ucMC?= =?us-ascii?Q?oRKtX4VSC/+sVKxgtfsdTDnnd62lTqS7mYFQeMml6kB3J3Gi8CuPjYkrtusd?= =?us-ascii?Q?fjuuqgG0VA1el0COac/RFtfNP/zP84GpONbeG+25DzlhNnUVtcfHPCs33Cn8?= =?us-ascii?Q?EGlyhgpu6MAkr6aHOhlrtxVS+bEVNGJqP111LzypUeZuu256sY/ToCRzcxYn?= =?us-ascii?Q?bad/NSk0JSKmaU5V6F5aryii6Wn5BZ1w1x/92IUIgVsLSn3jvm35zeBQlNnR?= =?us-ascii?Q?Zhbun2ErdB9tqtLI9w5Kzg1nX/lskvtWOUbbXH9o/tHjIIwGfsrgxKJFvIdH?= =?us-ascii?Q?4WHD6Jn1jMAr15a+qHtv+8E9Nghgf57AesPQO7mI/rQ0FPr33I9CbeSpSq/K?= =?us-ascii?Q?wrDgAy6hxdQtbfDS7cV3VvHE+M7Cnt+pRAni+PbQu7+OG8xoMRLvzHK/gX+T?= =?us-ascii?Q?7mIt8bq+uHjJWgOBzIoWzONHAZGEMwIGj6sVWR9UCUyeqCKMIxS28Z9JiJBB?= =?us-ascii?Q?LVYwtSgZxalgM8xPaLyCXxXjSBwPEDGwwB9/TJKQihVGLen/kzr0F+Uuo7fa?= =?us-ascii?Q?NpZ4YCUvsZ7fuYdHTqQ3G5uCTRBMVv4iQxVHoSgbreSVj/+Zzb2MG4yWLkG2?= =?us-ascii?Q?o2XVHfns4tPF9RjPqIi13Umqaz2TEhkYvVX2OuNc2aCZs6gCK6zaSL3cCr+Z?= =?us-ascii?Q?HXxD2ZzvxnfONUR5CLIdxWPPULGPJYD+gUiOWD5u81ylG+QKSlPxfacr+wkW?= =?us-ascii?Q?rWfI/Gbu36vX1kyBa9Cx18Zt/k32ZwdoE2tuOYwNvm5WgT1mWJ8o1+gRn+qa?= =?us-ascii?Q?VTjTV0lZ40DR0vvhz1D7ljX5pu9V0XftwnW78r8iZahemhqUhM7QVF/3zsA?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0862;5:xAnmo1/98aMGm1rszD/HK0mnIcqWfxike9I/cD+1FM6IBmirCUFUsMZeMHN9A5/tH2/jDroq70TJRh73xOkKazk6fP55CQ7mYuPTG76zwq8iKtUxL5q6/dDAWk3xivWqdsPhQ7q90nMDwte1JSDyMg==;24:3IVNU3A8hKj3GSky4HQ5kZfi2p9HYtNZTx1jKQ3yfTWfAbOLla0dmFXMDvJ3tYMTLxjP7izHCA7ukmtKyAo7oHgvnAul3tnvAQOKgNBaPZU=;20:3tGfVybnehwnB7sCVmyIxBg8AknBXBB9Ppa4IbzP9atKW8et1SzPybUaOkH60RAEKk4BlbLVk+ZhWIS9bdDDNw== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2015 09:31:25.5973 (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: DM2PR0301MB0862 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2452 Lines: 65 On Mon, Aug 17, 2015 at 02:02:08PM +0800, Baolin Wang wrote: > On 17 August 2015 at 09:15, Li Jun wrote: > > On Fri, Aug 14, 2015 at 07:04:56PM +0800, Baolin Wang wrote: > >> On 14 August 2015 at 16:55, Li Jun wrote: > >> > Hi Baolin, > >> > > >> > On Fri, Aug 14, 2015 at 05:47:43PM +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. > >> >> > >> > > >> > Why not add power supply class support into this? > >> > > >> > >> Hi Jun, > >> > >> We don't need the power supply class support into the usb charger, > > I suppose usb charger is also a power supply for the system, we can use power > > supply class framework for notify mechanism and get/set many attributes(maybe > > also the current limit), I see those usb charger drivers under ./driver/power/ > > are designed with power supply supported. > > > > I don't think so. The usb charger is rely on the usb gadget, which is > not a complete power supply device and it combines the usb and the > power supply. Thus we make it into usb gadget system. Thanks. > Why it cannot be a complete power supply device? I was thinking this framework can cover it, I have no doubt on putting this framework into gadget system, but still can't understand why we don't need power supply class at all for a usb charger, or you think introduce power supply into usb gadget is not a right direction from code structure point view? Li Jun > > Li Jun > >> just introduce the notify mechanism for power to set the current limit > >> when notifying some events from usb charger. Maybe I misunderstand > >> your meanings, please describe it detailedly. Thanks for your > >> comments. > >> > >> > Li Jun > >> > > >> > >> > >> > >> -- > >> Baolin.wang > >> Best Regards > > > > -- > Baolin.wang > Best Regards -- 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/