Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp281951yba; Wed, 15 May 2019 00:58:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGNyePrsUFXAK90Zk2xPZcMycdlaUdbdA67Z/ff4KndCZbLCs7vCsK+1lV74IvDpDg6XSX X-Received: by 2002:a63:534f:: with SMTP id t15mr43417952pgl.445.1557907120627; Wed, 15 May 2019 00:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557907120; cv=none; d=google.com; s=arc-20160816; b=XPB5xc6YHkm8GhrGScY431OSBepsENCG+6j+frg3QK3J4PHJS/owsBpswP4VBkUDzP dmjEd3S3OVWwESTIs1Bl7j66rHXnPCyIo/dYAUCWXLKZtVCjunGCjKDQAUsN7K/Ot/Lq Hho0IM+rzlw09FwNgkEvPCYylzRYEgnVNIgdRrmMNiE6ZiWXUB4b+bW53Gy9ojUSOve1 aFDhAEcREzRUiGj80YzBVJpiM8UaYH7jQlAervok4nsndJeK+x12qaPQvYiDlfbeGv+D rWuHzh4xjOVuPP3hghctz9eYhjPtVwcSQMdS05g1TGCXhVC27NVkhPE/XzaolqRp2NMB F92A== ARC-Message-Signature: i=1; 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=Qfw7tIirkwCnRpnfsoTwEOAubjFw3Zu2rG9tnNmnNkw=; b=kXWG8GC69t16Bdp5RaPC4slSwSl3yNGogxKqDWjRIlhsXaVbo7xzaokAykUaelNYUE nRjXjEOR3tgHTriZALbCAk2uSglyMVD9CxrAGUSgXgccO8iSMcYLMse9lYkwSO3PVLpc RJI5YLuCp22GO2GyMUa/8upFShvmMTLfDn0ASVmUleBcK0keIBe75K+aS/0nRv0T2uWK k0zwSV8PPDzumetnXnlSUASfzlfiHmM0VLpNmS/2zN6FYpf6nZsgI1da30MhVxQFtN/x sDyC8MQ2ucJlq875EfTcwVzSr1CtRmxMUn2NDY2bQmFB8AzQT7XEscMLUefG8sZimR0x 5TGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=W2KaMfNU; 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 s1si1110536plr.428.2019.05.15.00.58.25; Wed, 15 May 2019 00:58:40 -0700 (PDT) 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=W2KaMfNU; 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 S1726039AbfEOH4P (ORCPT + 99 others); Wed, 15 May 2019 03:56:15 -0400 Received: from mail-eopbgr70080.outbound.protection.outlook.com ([40.107.7.80]:31068 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725876AbfEOH4P (ORCPT ); Wed, 15 May 2019 03:56:15 -0400 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=Qfw7tIirkwCnRpnfsoTwEOAubjFw3Zu2rG9tnNmnNkw=; b=W2KaMfNU79AUzzD4BuoN50gdx9ccXb12frws7P38JjziK41O7tJbaWKea/nYcmV5JtuAgAlBCGON2xLv8KEY+JurLDRxgpdN0AsDDDg5c7yvQoo4YpdmAgE/TgKlfbUck8ytvj7Dbca3vpWro2W5/G4Evzl7+tzPugeklYkoYbI= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB4644.eurprd04.prod.outlook.com (52.135.149.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1878.24; Wed, 15 May 2019 07:53:28 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::3173:24:d401:2378%6]) with mapi id 15.20.1878.024; Wed, 15 May 2019 07:53:28 +0000 From: Peng Fan To: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Aisheng Dong CC: dl-linux-imx , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "van.freenix@gmail.com" , Peng Fan , Srinivas Kandagatla , Pengutronix Kernel Team Subject: [PATCH V3 2/4] nvmem: imx: add i.MX8 nvmem driver Thread-Topic: [PATCH V3 2/4] nvmem: imx: add i.MX8 nvmem driver Thread-Index: AQHVCvNIvY47qD01X0W2BY2Hg3O+1g== Date: Wed, 15 May 2019 07:53:27 +0000 Message-ID: <20190515080703.19147-2-peng.fan@nxp.com> References: <20190515080703.19147-1-peng.fan@nxp.com> In-Reply-To: <20190515080703.19147-1-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.16.4 x-clientproxiedby: HK0PR01CA0044.apcprd01.prod.exchangelabs.com (2603:1096:203:3e::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.71] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2315de07-dec2-4f29-121f-08d6d90a6a5f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020);SRVR:AM0PR04MB4644; x-ms-traffictypediagnostic: AM0PR04MB4644: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0038DE95A2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(366004)(39860400002)(396003)(346002)(199004)(189003)(99286004)(54906003)(256004)(110136005)(50226002)(478600001)(8936002)(14454004)(14444005)(2501003)(66066001)(71190400001)(71200400001)(52116002)(102836004)(53936002)(7736002)(4326008)(305945005)(6506007)(81156014)(386003)(81166006)(25786009)(8676002)(6636002)(66476007)(66446008)(64756008)(76176011)(66946007)(73956011)(66556008)(486006)(3846002)(44832011)(476003)(6512007)(6436002)(2616005)(446003)(11346002)(68736007)(6486002)(186003)(7416002)(2906002)(6116002)(316002)(1076003)(36756003)(26005)(86362001)(5660300002)(2201001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4644;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-message-info: LTAjgpv9ks9OlynULbxkgMaR7I3CclG+/T+wFz+B/OaBGqN7NWmYlFquuU6mlpojSIK3nUhbK5k9YWjEHDLq7Lj1CvYT8Sbr6Gcdtvrcv+dcOh4GVaWbyh1P/Q3rYUqGxAK4x8lSV/0enYg08gQMNxsmrud/Vc5qv6bKywnlrHi4Te612ov+/OgJf7N1QV0j5mh2kpXJdUffPcn2vhjc7SykmO9Cdrxu1qdHT22mLfBOatP3z/mB8FcVlL4hvr4w0USULxHttqRDJIT3PkwnqspNN3dlVPaTsikZhozXDaqJndNXvLp9wk3bnYvapK2FkxfDnFWCJ7f5DvKMVO0n3pT8LuM88YZrFb9hMVdrLDRLweiGncFZ7LCSHx1g+VN+eiZozfv+S1Wa6QFZydlBdp54hr8IsJrFTflmpY7XcB0= 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: 2315de07-dec2-4f29-121f-08d6d90a6a5f X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2019 07:53:27.9588 (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-Transport-CrossTenantHeadersStamped: AM0PR04MB4644 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhpcyBwYXRjaCBhZGRzIGkuTVg4IG52bWVtIG9jb3RwIGRyaXZlciB0byBhY2Nlc3MgZnVzZSB2 aWENClJQQyB0byBpLk1YOCBzeXN0ZW0gY29udHJvbGxlci4NCg0KQ2M6IFNyaW5pdmFzIEthbmRh Z2F0bGEgPHNyaW5pdmFzLmthbmRhZ2F0bGFAbGluYXJvLm9yZz4NCkNjOiBTaGF3biBHdW8gPHNo YXduZ3VvQGtlcm5lbC5vcmc+DQpDYzogU2FzY2hhIEhhdWVyIDxzLmhhdWVyQHBlbmd1dHJvbml4 LmRlPg0KQ2M6IFBlbmd1dHJvbml4IEtlcm5lbCBUZWFtIDxrZXJuZWxAcGVuZ3V0cm9uaXguZGU+ DQpDYzogRmFiaW8gRXN0ZXZhbSA8ZmVzdGV2YW1AZ21haWwuY29tPg0KQ2M6IE5YUCBMaW51eCBU ZWFtIDxsaW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