Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp311940ybl; Wed, 11 Dec 2019 19:00:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxiMj4pW6Tsv3hOcqZm0cxN4y2+exQhRi71OyK6YiTeoXZByiD8WIKVsy9O9YpYBr4qO0rc X-Received: by 2002:a05:6830:1d1:: with SMTP id r17mr5795061ota.151.1576119632636; Wed, 11 Dec 2019 19:00:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1576119632; cv=pass; d=google.com; s=arc-20160816; b=t/2IN0/gOXPY0Yo9BoGqLGlN4sfFvTWXxNfTbyFFjTeWDNnA+WcFGWLCjtY29N80nO 2Frj5bibPTO4j4WRyhpiQHTqxkwXGS25TE9H/qz79jQcydOFYHxeygcMjwCKfaZgMs2y +GgokSNYOHIlQUjDu1e0wCOsGGCTEXQ/GiP2/IfdcvvP0ZQpmqoCTnPjGvlPCWBjsW// zROO8whtebkFB72dv5pnSfP8kPVxjmExeFy4XWAWQjip7E/kNCOBHEj5FqWAcRYpbAAK xhFACpei4m2lN0u56BIreNJmmpMmWMio+Lp+HJbN+SrEEX3CkBBZxZmNEIPjKCI3sL9Y 2wmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=NdMtZnMiQ6ShimXBpJCJMex9hCe7iXPibZaNgDSF/X0=; b=jWF72wDOSxxcjNeIX1VAn2appARodHNiYFLgRYes3ix8MUhV83bKgqE9f77XbrZQL8 zJ7S1ku3LeK1H655k/YY0CVPPSG4khGuRAJp6AtN1wSiKSfNMqWYLo1mEao1pQF5SJ6N zpgMb83l9Jt97VraRY51ErH88eSPfiGSTMucybkbrxzuu9V6StFJDwhSEZUEljq5bObo fImjiTIH3zgMaoPjdhE977/+WaWC1VPGV9eGPQWyuMz7sS/eGmrmq0Ra756cgbVsvYOg xV0KNYK8adE7cAD6cPXmDOwUDmtrmZbCUWRU1V5yNnZRMirfUIAFgJiY8RkN+f1aiBob /TJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ar3zGG8Y; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si2413185otr.145.2019.12.11.19.00.20; Wed, 11 Dec 2019 19:00:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=ar3zGG8Y; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbfLLC7e (ORCPT + 99 others); Wed, 11 Dec 2019 21:59:34 -0500 Received: from mail-eopbgr60065.outbound.protection.outlook.com ([40.107.6.65]:2682 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727472AbfLLC7c (ORCPT ); Wed, 11 Dec 2019 21:59:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZZ7AB2cKiat6cMzw4+pKb6dPJbK2BXOswd/0I6iWxVPtBMuwuSd6BhgMMQeNDBIie5hvWHHTd43rzknqLf3PJ9Gw1W8FioCHRyy2QMh+LMaIsFdI6611W9YRKO+OW59LUH0ENCyI9BbhBmeXDtnd9dTIpQYPshpQE9bHTuL7QCMJ35LAol+pCgP8Ksfcu9kdWHQ+dUHvQZHU88uOyWafiqJzlZ+83Bu8Ub1EjqAnbhBJpUNKVbIrKJPU/I/ZpxGYxW7Hz6NhaayNBeP61xq3xFzWuZXc3cTkhqVYvByXcbBEroLm4Q3pLkFSkWaVmVdCkpZwkHblUkGa2okWczLDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdMtZnMiQ6ShimXBpJCJMex9hCe7iXPibZaNgDSF/X0=; b=g4JTG8GSposTxHv4RFEWKKeBId0nRxSQDEgm4V6nzSMmjN/+SwCUZq2pv7c6ju7OKb52X80L0kjTUK/gK9hzMuHiPZPAYo1p/YutcNx+6Pu77NknLKlWuCtAYiN79De4tfBZv2Bg+15rRnOp/N4YKXMsVlbttVNtV32j3k6tmPfYJWmmlmIUMAOMUtQGJ/GUvddGDPPK5RN/yJkuevwsG6DGhSI3iHuG4i7pFyL4TLaGAYmudDREiVg7Dt+j/qMQnz3N4CNuMyoYDtWsg2XyNFwppQ5c3tJJ5wS2kXt8CRGJ0W83HlltBTY9qYAygMQg+PLdr7la/MOuncDUibUxvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NdMtZnMiQ6ShimXBpJCJMex9hCe7iXPibZaNgDSF/X0=; b=ar3zGG8YHoB3M6Cz+TUOXM9m0IdyFVVgeMIatL2mtfo2R11aGGGH8Oan+ES/M2YXfB1u0iGQxvkva79P5VCadyXJflFU7wxciNUXLHoePDFDtxDswcEFityLfzm3U7HlpDb4TsX7InsD3WZjAMVGzUE3OJcCZkLPYO9w1JfE+8w= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB6196.eurprd04.prod.outlook.com (20.179.34.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Thu, 12 Dec 2019 02:59:04 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::505:87e7:6b49:3d29]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::505:87e7:6b49:3d29%7]) with mapi id 15.20.2538.017; Thu, 12 Dec 2019 02:59:04 +0000 From: Peng Fan To: "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa , Leonard Crestez CC: "kernel@pengutronix.de" , dl-linux-imx , Aisheng Dong , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Anson Huang , Jacky Bai , Peng Fan Subject: [PATCH V2 5/9] clk: imx: gate3: Switch to clk_hw based API Thread-Topic: [PATCH V2 5/9] clk: imx: gate3: Switch to clk_hw based API Thread-Index: AQHVsJgd+KHoh+Od+k6savbze6AFKQ== Date: Thu, 12 Dec 2019 02:59:04 +0000 Message-ID: <1576119353-26679-6-git-send-email-peng.fan@nxp.com> References: <1576119353-26679-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1576119353-26679-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: fa648a4d-31ea-4d6d-f884-08d77eaf3f7b x-ms-traffictypediagnostic: AM0PR04MB6196:|AM0PR04MB6196: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-forefront-prvs: 0249EFCB0B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(346002)(366004)(39860400002)(376002)(199004)(189003)(81156014)(8936002)(316002)(81166006)(8676002)(36756003)(52116002)(478600001)(6512007)(6486002)(71200400001)(110136005)(54906003)(86362001)(186003)(66476007)(4326008)(5660300002)(2906002)(66446008)(64756008)(44832011)(26005)(6636002)(66946007)(6506007)(2616005)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB6196;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Yp+Isp9n32VloZosSsSv3OVksf61Aw6pK6fDIKpTPbJGxbomeGwZBLDiwWNCgZTE6C+WralWjMa8XTvI3iOrJdqO74WHmoZG3O/IbibfvDF2NJ1f7WyC2xprS26BXnewkDaHhH/G/Y9Mnjp5F0LiwbiD63p3qdpJ+aPeC6PHsVXYKCjLIH+hyQMnKfamIiJi5Lf3wsxJxSI5N9K7nukoSkozvDfdt9p+N4uNOf8/Q4IogVB/gj5dfRaj2y9smV7lunaZbQhP4dX8Gw6xktAECfx2mcwvRMm3lQ0Isn8Srfdvi6CNLvGMcurSg6AA2HB15kf9U58PXkbiSasfh7iM8a//l8cwVluh00Wj+QLkzYVP5mcwZEGiMc7Kz4Mc1NnWK2n3jkBBWOpa9zoa4behy4fx4IsgeC0QlznXIGICWAjuMWRhgzcwA97T+wClOMWg Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa648a4d-31ea-4d6d-f884-08d77eaf3f7b X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2019 02:59:04.7779 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VPQfLypCRQ+M2hEWUDfAfBUqUANYocm/+qBbQFzcZyNxoGJwBGw32lXMIUMlAT8liIPyS2m9+XgO2fdIN48jwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6196 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan Switch the imx_clk_hw_gate3_flags function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan --- drivers/clk/imx/clk.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index e28166a63894..65d80c675aa9 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -370,15 +370,18 @@ static inline struct clk_hw *imx_clk_hw_gate3(const c= har *name, const char *pare reg, shift, 0, &imx_ccm_lock); } =20 -static inline struct clk *imx_clk_gate3_flags(const char *name, +static inline struct clk_hw *imx_clk_hw_gate3_flags(const char *name, const char *parent, void __iomem *reg, u8 shift, unsigned long flags) { - return clk_register_gate(NULL, name, parent, + return clk_hw_register_gate(NULL, name, parent, flags | CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, reg, shift, 0, &imx_ccm_lock); } =20 +#define imx_clk_gate3_flags(name, parent, reg, shift, flags) \ + to_clk(imx_clk_hw_gate3_flags(name, parent, reg, shift, flags)) + static inline struct clk_hw *imx_clk_hw_gate4(const char *name, const char= *parent, void __iomem *reg, u8 shift) { --=20 2.16.4