Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbdGCDSm (ORCPT ); Sun, 2 Jul 2017 23:18:42 -0400 Received: from mail-ve1eur01on0051.outbound.protection.outlook.com ([104.47.1.51]:40224 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752110AbdGCDSk (ORCPT ); Sun, 2 Jul 2017 23:18:40 -0400 From: "A.s. Dong" To: Stephen Boyd CC: Dong Aisheng , "linux-clk@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "mturquette@baylibre.com" , "shawnguo@kernel.org" , "Anson Huang" , Jacky Bai Subject: RE: [PATCH 9/9] clk: imx: add imx7ulp clk driver Thread-Topic: [PATCH 9/9] clk: imx: add imx7ulp clk driver Thread-Index: AQHSzYOH73b4znJbl0CVMpAdvEkJyqItNzCAgACA+QCAALgbAIAAbniggA+KCICAA1G0cA== Date: Mon, 3 Jul 2017 03:18:35 +0000 Message-ID: References: <1494856763-6543-1-git-send-email-aisheng.dong@nxp.com> <1494856763-6543-10-git-send-email-aisheng.dong@nxp.com> <20170620020119.GQ4493@codeaurora.org> <20170620094256.GF6805@b29396-OptiPlex-7040> <20170620204152.GS4493@codeaurora.org> <20170701003511.GR22780@codeaurora.org> In-Reply-To: <20170701003511.GR22780@codeaurora.org> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: codeaurora.org; dkim=none (message not signed) header.d=none;codeaurora.org; dmarc=none action=none header.from=nxp.com; x-originating-ip: [199.59.231.64] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM3PR04MB1315;7:zBY8nb0iKwyRs/ZWox20ZiDiIitYDw6xWjNn62/kUMTcziHzpeYJ5WT0UTd1Kk/cPIS0OnPGkIYy8/x1UBpeiVhFXuFNamHuH0/DDDan8JCKrJoyY3SnR4sK9x51Geti2yFtgsaBzreS+SdymyaoKsBPR3D+DbhmrXPTu8Wp25W8Z96bG7u3F31KV3NIIC5DHoCEwBUn5bKW9yyFva03r+uxzuJv8nxkBrOIgbuzXE09VzLPHdRYXZJMBHZT93YANuG8V6WghMHFszOQoZ6urthOYQOPg1qRcaSVuu4QGTSnZekHLsL5okznvz9sVf6slogHh6TscZHX/XsDPo2DVZPZGupCNxEkWsSbdEu41V5BCc9yHcwIUFXoQ8PV36mfRsAMKE8xCDWQQG4a1uQ73R6z9SK94HRF0ILMFKBjUxTT99H8o0G+Wpb5oEA8bgMN9Iz2gu+/gt7z3Xmf1RrIuZVCcei3jbUGJXCsqwCRime8mbe/zRe3nd163x9DULIIFU4v3nBkA0KfXsfSz5Mf1yMogjUQSu2scDQ9O1u/v2YOkxH4es1KeCn/iSboGhaROl6gfesgEVXBMOeDHjYKVImfSPa6FYN+/ri9sB4vNifNX9f3kKFGjP2s4Nr/gBdP5zYk5ECAbKsaWxL0Nm7uI2ysjvkOQKiUG+bNxOF8jDD7iF4CnMUwQOl4Y3Vr+oJYAFByhNCAQcjT9E8/2Tf3Esb6pqJ5ARKHcoMDNcfRERpecEpIeQX6TGCWvZ6kotVLhelRTzjZqpTB8uHsYxSi4CYHJNlpUY3EffZ0pnnKl+M= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10009020)(6009001)(39850400002)(39840400002)(39400400002)(39450400003)(39410400002)(39860400002)(13464003)(377454003)(51914003)(24454002)(54906002)(229853002)(38730400002)(6436002)(99286003)(9686003)(7696004)(106356001)(55016002)(2900100001)(74316002)(5660300001)(6506006)(66066001)(6246003)(110136004)(76176999)(53936002)(53546010)(2950100002)(3846002)(54356999)(102836003)(50986999)(6916009)(6116002)(39060400002)(3660700001)(86362001)(189998001)(478600001)(8936002)(93886004)(2906002)(3280700002)(4326008)(25786009)(14454004)(5250100002)(33656002)(7736002)(81166006)(305945005)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM3PR04MB1315;H:AM3PR04MB306.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; x-ms-office365-filtering-correlation-id: f11e36cc-3175-4f92-27fb-08d4c1c230ee x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:AM3PR04MB1315; x-ms-traffictypediagnostic: AM3PR04MB1315: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(236129657087228)(9452136761055)(48057245064654)(258649278758335)(247924648384137); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123562025)(20161123560025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AM3PR04MB1315;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AM3PR04MB1315; x-forefront-prvs: 035748864E spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2017 03:18:35.2721 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR04MB1315 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v633IobP006666 Content-Length: 3317 Lines: 92 > -----Original Message----- > From: Stephen Boyd [mailto:sboyd@codeaurora.org] > Sent: Saturday, July 01, 2017 8:35 AM > To: A.s. Dong > Cc: Dong Aisheng; linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-arm-kernel@lists.infradead.org; mturquette@baylibre.com; > shawnguo@kernel.org; Anson Huang; Jacky Bai > Subject: Re: [PATCH 9/9] clk: imx: add imx7ulp clk driver > > On 06/21, A.s. Dong wrote: > > > -----Original Message----- > > > From: Stephen Boyd [mailto:sboyd@codeaurora.org] > > > Sent: Wednesday, June 21, 2017 4:42 AM > > > To: Dong Aisheng > > > Cc: A.s. Dong; linux-clk@vger.kernel.org; > > > linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > > > mturquette@baylibre.com; shawnguo@kernel.org; Anson Huang; Jacky Bai > > > Subject: Re: [PATCH 9/9] clk: imx: add imx7ulp clk driver > > > > > > On 06/20, Dong Aisheng wrote: > > > > On Mon, Jun 19, 2017 at 07:01:19PM -0700, Stephen Boyd wrote: > > > > > > > > > > Any reason why it can't be a platform driver? If not, please add > > > > > some comment explaining why. > > > > > > > > > > > > > Timer is using it at early stage. GIC seems not although standard > > > > binding claim possible clock requirement. > > > > Others still not sure. > > > > > > > > What your suggestion? > > > > Convert timer to platform driver and make clock as platform driver > > > > as > > > well? > > > > > > > > > > The timer can't be a platform driver because it would be too late. > > > The clock driver could register whatever clks are required for the > > > timer/GIC in a CLK_OF_DECLARE_DRIVER hook, and then leave the rest > > > to a platform driver. This way we get some of the device driver > framework in this code. > > > > > > > Okay, I could try it. Thanks. > > > > One thing is that TPM clock has a lot parents and parents having > > parents, as well as PIT timer. So I may need enable more than half > > clocks in CLK_OF_DECLARE_DRIVER hook. > > That's fine. > > > > > BTW, What's benefit to convert into two parts of probe? > > I'm not quite if I already get it all, can you help clarify it? > > > > The benefit is that we still get a platform driver and we can associate a > device pointer with the clock controller eventually. > Here's a reply I sent yesterday on the same topic: > > Reasons (in no particular order): > > 1. We get a dev pointer to use with clk_hw_register() > > 2. We can handle probe defer if some resource is not available > > 3. Using device model gets us a hook into power management frameworks > like runtime PM and system PM for things like suspend and hibernate > > 4. It encourages a single DT node clk controller style binding > instead of a single node per clk style binding > > 5. We can use non-DT specific functions like devm_ioremap_resource() to > map > registers and acquire other resources, leading to more portable and > generic code > > 6. We may be able to make the device driver a module, which will > make distros happy if we don't have to compile in all > these clk drivers to the resulting vmlinux (this one doesn't > apply here) > Very clear. Thanks for the great explanation. Regards Dong Aisheng > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a > Linux Foundation Collaborative Project