Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753437AbbHQCk4 (ORCPT ); Sun, 16 Aug 2015 22:40:56 -0400 Received: from mail-bl2on0140.outbound.protection.outlook.com ([65.55.169.140]:2840 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752134AbbHQCky (ORCPT ); Sun, 16 Aug 2015 22:40:54 -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 09:15:44 +0800 From: Li Jun To: Baolin Wang CC: Felipe Balbi , Mark Brown , "Linus Walleij" , LKML , Greg KH , Peter Chen , , Alan Stern , , , , , , , , , , , Subject: Re: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation Message-ID: <20150817011541.GA7122@shlinux2> References: <20150814085527.GA17920@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;BN1AFFO11FD015;1:5XshJ+weMRyKX557u3EpO+EogBz39jrfygknaT2LmFbjxDbxNvxqph3tKSwtv34pPmc+XQ4ar+Q0FFLjFd0Ixkdfc+4ahj4GsmHRoEoesC4KPbDfd3C/8OIcJTZLHL502hDBhw7+WNR7ZTn4dZDUkrXLZbTzQ2Is8/pCesWQ3ufmmnrj+gFLkwtFnkS+MCXZjyAFpGW4n1t/XlfQXKq+jP3U1bbMpvFKzYzxcIIfwFuI+XOu+5X+lmY4sXBHzbOi0roeZCTH/TvuuBkMi3jg7cst2/gPldcnC49pbpa0gvLWgQcn0iCdm4ennGUyE72ke4he+I2bAsfYVxEyZeh0ND579VPafQ8PrKAt3uolUSJMcas95QfYI3WxII879m8B5NX2exHBV+cF32UOLrJcqA== X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(3050300001)(24454002)(199003)(189002)(87936001)(62966003)(104016003)(77156002)(105606002)(81156007)(106466001)(69596002)(83506001)(33656002)(64706001)(47776003)(33716001)(19580395003)(6806004)(19580405001)(85426001)(97736004)(4001350100001)(4001540100001)(50986999)(77096005)(2950100001)(68736005)(97756001)(23726002)(5001960100002)(189998001)(110136002)(46102003)(92566002)(5001830100001)(50466002)(46406003)(76176999)(54356999)(5001860100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0863;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0863;2:5j465hQyhfCfO2dsjIp89+Q32TPvXgwRiVEipGWOXRktxaOJPC9x3w5espjkA+pYm5TaA11VDls/8Yn0ATYicyP170UCW58nV8BP+UQQAzpRcqFVuYN1vLcs/teJpOaW1o/GFj64UIsNcg7pLzZ6wZ8xlRYlp/xDNux0zDslE1A=;3:qZ2SQ3YmdInBfXVmihBGnVVufXsBYXmI74vnZmycxhCrcsPnCWCZqF/HhkJOCIX8OhJAVwtNgttKAdcd/zLIkndqa8jCa55vsDXPJTt50q+WyhhJ1YHOAQiNtxXtRq3o4yxUSNxe1V4Hx5l3vN+T7/gQQ0TqeeGE6X4Nqe1nGavgNSEWajb1fAkGqI4UBm88anZh4+neLkLIpuO7OUbnZbOBzxSU0XDyH1Jl3EaZDCE=;25:g6xQrZ0BUl6kPMEyWolwFZGM/cnYgNNUDL2OKU1qJ63QALXi2ZLVfRv98l659ZvwaEP5208CWFvrcs5XNeN8c9NNYOuq3Az5INy+IsKfRazhG05RrCxntu/CLAWWGUt6oXXumveDbBa7SVzSI29qBP7lgFi6GY/WIxDfpUSOsmi8zaPU/aa6V0DFj17by/2cCp+dDB3QB5Ct3ZBm0S+4BnNTfLRRe8wVxmitObF320yzICIIf6loOAUkvD3QfvbH X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0863; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0863;20:N6VucYToiK+6Wu3DZk9HoPyCrP51nY7bcLDXeyTgaJ9VABu5PSeMgqiaRGpYjuR+dXsYiNPI/oF2ROi+REUQjEzodOPO3AgBL+EeW6WfIM1dgqCoKRIVBdFn/bBfQdcSDqpvdzXMUSL+XFv1GsyTAfkgE9LSmFaQP8xMyw+zWYca0sSrimkZt6/drC+oWLn4NTEjWLPWdTS8jZQpJPMuX6P5X8voCxRv0rmrx7giS1PrAWEHXMRRHjJs0p6NQt/jk1ziDcgDfXUBOB52KFA5sBe1UmSmiR/KkKcX1Zh3zIT1vZ/w4d4b5JdGbFQswAQ0NTFJbktBAZ8dQm8VSrgh1DdDNeQAkwZF6ZP46NcaiWI=;4:Z0W5iamAiaT7Dn1Lj4EkcUM2gWRI1fXzefiewx4PsNlfGpgXcYoZjuCn4EJr8iHsiVuv5k0avdfMTUpKAfOcTicr5n9VFHt+jkqW1f9beThjegPm/lbBQornYCTVg4fyOZnURUd+4WckpWUbCmN7Ox3zaoyoXBslSDVUpUYzWQ6gJdPCyxOoyExLstYKgpjDppmGqBQd7CGgm4EcQCxk3RxuRtZRRIFoasuFybQ6Hwnmufz0ihpvr7JwZrPHjixSv2xxDhndL4lQ0CJnoIv0mwiXxBH36ej+Nr9PZM7pnYxbJ9EV6Ang2NVAwcCWg5ZN 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:DM2PR0301MB0863;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0863; X-Forefront-PRVS: 0671F32598 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0863;23:Vg55qkh2DAXcWh5GNHAcs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NKGZEKXGAM9/t5vcyaNkzeQH41c3JVssmhoxaZpk?= =?us-ascii?Q?hCe06NJhBi1mfap0JRtx5m69u8n5Ddd0T5XV6np0NOH4f/C6Ezgh8M4P3tFj?= =?us-ascii?Q?0bG/Tzx+zgx9zd4Ct0dZxgnsEzkMTTZFETwm4WatDUt5LbQYqwmwZ7iTdTgn?= =?us-ascii?Q?BYNwFL7EeeKGUFA9L68GmV3XWHLBLuOnicjouLGVFuBgYTyZRq+OYXFWyTtz?= =?us-ascii?Q?vjZfhWpO+gHipq/mqHoHHgLP8FJeK+4uAxRIp/CWOxPlIOa34YTwlD8v8VmH?= =?us-ascii?Q?ewEYbWM83pSa4iwk=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0863;5:6Cud5jVaW2oHNqdmb5C3gqgIz22cjvwzzhOL46QjpMiLAL2nPc6Ju/d/zSYuP9EvRyWZ4Ou5Gj6SOwRaWGj+i5TgcbOirK6xhVgMgi3IuC9xCTp2dgY10Sgw68AM4R2g7oWRMWVz9fYj5K7vlp5MfQ==;24:qcFpoPGJCMkz1GpRd0mCvallUaH311BNjChfKzx28rf876c/IHAd5Rb3Vcy19Wky4WjjNjklXDSk4qzr7mJW07wSeZH3cMOXqUemEKvwu4g=;20:sNdoXSXbLSMSuUVC2xiL10gljju+c6BpzOKsmIXTUjF862GPiaEAJ/Pkc8i03u0bdcVsmPgkRCTa/o+uvq8aXA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2015 02:26:43.4218 (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: DM2PR0301MB0863 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 44 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. 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 -- 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/