Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1677576ybz; Thu, 23 Apr 2020 03:41:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLnTX0kYqu0VeaQzLSSSrK/7fZvXdY7GZ56qlyVlmk1x7mwqMtVOfKd7dYglHBAcbrh6gOB X-Received: by 2002:a17:906:c82b:: with SMTP id dd11mr1954506ejb.216.1587638492804; Thu, 23 Apr 2020 03:41:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587638492; cv=pass; d=google.com; s=arc-20160816; b=iZMeG75+rj62WYlFphqchPjgA8uKLh4kcnN6mMuMFzHRyA8G2jSKYK3f26loa2U0ER n5VX/q1oyU+wVC/e+HVUOvcuVmjKaMa1LJAvECuNKVrHtL/H20EnGtDCPwnnlKCwElMU IfUSiJmymyHS7yQq04RM8FTz8fVuKVvZpubNfjbKxd1j/blfYQs5ckzbaTFJ/uYwXm7U /hUcnevUyL7p+4Yz0njhr/IOhmEICPYrDMK7c3K+dvyceuSa4UywQE7CPvwOEck0JU5G KkvwRbzI6n7F3DAnxaUkaeP+YdRdjDncq6tz4W2yrGYXE5RnQOGdQHt0LWv+dHliNokl WsBg== 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=BgXQqXd3k7Ry5uSR/sCFL67uXejxjD4vgIHNxPEeZEE=; b=CzVHwk/sWImcFYx1CZm8T0ehs9tD2Qnxv/p3xQWLvkLz12Jnsp6bxXaEoI3+dswPFF hsPBQtbrRwZ3FBOY9+nu6WWWqampWUG/0f+Tx3ueFHNzQXHJWDRsZXPR/UFUla/TZDC2 wyn7P5KjwdwOESWjhhR/RObLHKYiNiD8nMLCNrB/XmVuFestt9aB2LzqjnlGMPP0D78H VaMaLjNkbX94FVy2hGvnY7UnFjJtDomNGYoywno5Luu9NgsDpSsZXyEkWO8T3yCrH7f5 1LZP/6Y1br4wPsEd7Piphr3CRyajS0z53p64NjiJoM5bVdeNTT6pDJVDT9FztZaYeAw9 UHcA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Ghz8kfwE; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id o28si956434edz.180.2020.04.23.03.41.09; Thu, 23 Apr 2020 03:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Ghz8kfwE; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727014AbgDWKjr (ORCPT + 99 others); Thu, 23 Apr 2020 06:39:47 -0400 Received: from mail-eopbgr40072.outbound.protection.outlook.com ([40.107.4.72]:27005 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725863AbgDWKjq (ORCPT ); Thu, 23 Apr 2020 06:39:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TveFPiPUhWIg32R04eg8YX/zbTTD+V9hRPFMozQehgOQwTXz7zpEdp2njmUN40f9K4qcq7qiBLjq/rXVTceT2YdOYhN7mW5pnV7wiOqjfroI/drs5GHEJfvD8mSllZDdTykkcc3ZFRGWs1HcciaMfzHlSO3sKLL1Gd7yBK7W5Uul+e1X5Ipck0M8l1RK//R65TOyRMzwAikWuG1WJCYBO6B7SyGXK/sNBUSFGyaK83gjNU+pLJZs41u0Ck+tAoZkc90RgPya6aTn4tqNFlIzS+M49kC6IYShZh3SUbvaRVH/Z/1Smw5c7kMI2chx926uGTNhdFgBT5sFSlBaAbb1/g== 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=BgXQqXd3k7Ry5uSR/sCFL67uXejxjD4vgIHNxPEeZEE=; b=AV7OhwcsfgQ+UVZvsU6OWWD3qsVb6dZVAP8Gntu9WscsgGOlubyoUaDpUfEpo5xe99tmKiV9FCAOKSFnDfy7f+Y9DNTU2FZpxu5TjY5MH6e4oquZ4Vfw5MDZ0lcFlxYTr47fSKm2O27PsaVplDdjKMYtln2aV1Nc5rTON/fYF5DSRJCL7Ej4ZtGkCb9aLXX1hkceF8UUjl66i3n5OHEE2+yHq7djn9Ty44UmRhEweJY9Fb0QbuqVHE2XSt9VGcPXLJRbQbWfveAYrTJ95AcbNyCjGhd4p9q53OOuUgADyF+618IALZYNXmOCjoNYV7P2nllQsZW1e+I7k7Ok+KMaFQ== 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=BgXQqXd3k7Ry5uSR/sCFL67uXejxjD4vgIHNxPEeZEE=; b=Ghz8kfwE6euXdV34e0anr5TVYHzr4izHYdavw3/VZskyxEG9sGduTUiX4HPPvumKzkssMbZ6WItLj9NTqOOJ8uT6NxvJG1gYyzHEoGnYZLudhaltngz3jOzJSVvIpPzYUgMgd7tMOCTCovup6s8mCOeWHP/kK+wULBCbxSSfaRc= Received: from AM6PR04MB4966.eurprd04.prod.outlook.com (2603:10a6:20b:2::14) by AM6PR04MB4326.eurprd04.prod.outlook.com (2603:10a6:209:4d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Thu, 23 Apr 2020 10:39:42 +0000 Received: from AM6PR04MB4966.eurprd04.prod.outlook.com ([fe80::d9f7:5527:e89d:1ae3]) by AM6PR04MB4966.eurprd04.prod.outlook.com ([fe80::d9f7:5527:e89d:1ae3%7]) with mapi id 15.20.2921.032; Thu, 23 Apr 2020 10:39:42 +0000 From: Aisheng Dong To: Peng Fan , "broonie@kernel.org" CC: "rafael@kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "S.j. Wang" Subject: RE: [PATCH] regmap: mmio: prepare/unprepare clk only when read/write Thread-Topic: [PATCH] regmap: mmio: prepare/unprepare clk only when read/write Thread-Index: AQHWGTO+pFfuDihUFU+ofwmpi1EKU6iGfXDw Date: Thu, 23 Apr 2020 10:39:42 +0000 Message-ID: References: <1587620791-5279-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1587620791-5279-1-git-send-email-peng.fan@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9815e67a-1fa9-40e7-67dc-08d7e772a21d x-ms-traffictypediagnostic: AM6PR04MB4326:|AM6PR04MB4326: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:923; x-forefront-prvs: 03827AF76E x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4966.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(39860400002)(136003)(346002)(366004)(396003)(2906002)(81156014)(76116006)(54906003)(8936002)(33656002)(86362001)(55016002)(9686003)(52536014)(5660300002)(66446008)(186003)(66476007)(66946007)(66556008)(64756008)(4326008)(478600001)(8676002)(6506007)(71200400001)(110136005)(44832011)(316002)(7696005)(26005);DIR:OUT;SFP:1101; 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: y7jT7KLMHrIvBWNzjeUrtsZce70/pEZSTVbRLVdNcxaaNYvWnElMfS1633EKZyIMy1DRMVor6SdPdBqnCvtzw93hBvxPR4PgaZqfq/C4Tt6ugEibsDERL9ajWermlZC1PIEAXtVW7ftgaYn+Q2ztCVL+xvwQb1cm1abWEzxZTTgqicAl+gatNbjoR42MSioj0FRCKZvbXfN6G5ZhIqMpvKYhf3QhR8J5ZHbXnrLBxoJta7l80Y+FeM1wz+fX+y1DOxn6qphopbBPdtMFT/LPptXAaoSHj95+q+PLFqqiBs1eUnTOw0ZupGL+HqmuwbTep+i0D6KGcdPSccLV2rkRx7PIIDtGebCrUwvH6PVOqOdczzBHBEfqHc06PV31/ctmAftLTyIht8fnmxIFUlwD7C0G0g/xyk0pgg0kIxOEU5TuW+gILBCOl/MGdqXfBEAW x-ms-exchange-antispam-messagedata: ss23oECr++YzVb9UCfejOJJJMec/Wb64aRR1+oJP+FnQ5r3o1BOLFfDexjGSkasi5ixvjrR2PmX8+hB5nI6hswhPtKLWHrHtmXWlmABgbV056R9z2CoCPFveHIF1QxH7xa1qMpCtrnEO7dVxlnCA6Q== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9815e67a-1fa9-40e7-67dc-08d7e772a21d X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2020 10:39:42.7739 (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: x3gsuOQgkkrCtKBebAMa+uLsY1hGjNLL4SDDE8QpnT/9g1Ku428yoJTSWJR4IL+K8mS9YylpuFtv1PcoG2SVMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4326 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBQZW5nIEZhbiA8cGVuZy5mYW5AbnhwLmNvbT4NCj4gU2VudDogVGh1cnNkYXksIEFw cmlsIDIzLCAyMDIwIDE6NDcgUE0NCj4gDQo+IHVzZSBjbGtfcHJlcGFyZSBhdCB0aGUgdmVyeSBi ZWdpbm5pbmcgd2lsbCBpbnZva2UgcG0gcnVudGltZSByZXN1bWUsIGlmIHRoZSBjbGsgaXMNCj4g YmluZGVkIHdpdGggYSBwb3dlciBkb21haW4uIFRoaXMgd2lsbCBjYXVzZSBydW50aW1lIHBvd2Vy IGhpZ2guIExldCdzIHVzZQ0KPiBjbGtfcHJlcGFyZV9lbmFibGUgYW5kIGNsa19kaXNhYmxlX3Vu cHJlcGFyZSB3aGVuIHJlYWQvd3JpdGUgdG8gYXZvaWQgdGhlDQo+IHJ1bnRpbWUgcG93ZXIgaXNz dWUuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBQZW5nIEZhbiA8cGVuZy5mYW5AbnhwLmNvbT4NCg0K SSB3b25kZXIgeW91IG1heSBjYW4ndCBkb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