Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4483239yba; Tue, 7 May 2019 19:57:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9x3oE4l5RolbGL2eEbiPlsb5Nn3H93LdV45+4rA0LnYwJPd1T5R8h+QdMEcUUqq0fB+eF X-Received: by 2002:a17:902:8ec8:: with SMTP id x8mr43908257plo.21.1557284239019; Tue, 07 May 2019 19:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557284239; cv=none; d=google.com; s=arc-20160816; b=moLdqxE2ZTUjQP2X4df1stms1c6qUaNPR8KNkb7MlV8pzmLP0rQFr1BsV4Kpdd402R rg+Nvyr445jjGMIUheUFbSS0ha4xi/1lBF2GD3wD8kziENe9P1F9Sq3ridLPo3bBS8Eo 2T+xP0XCBywYMMgaZRDo3BUdVbLZzXHBUwogoBZqyIiNJwLSaX8hyFpeLVydgrWWyy7c KR6OoScOby0WLIQXlyec0K8Rl5AZGp3i4dWRWiaxiN/UDLcDNHnwpD+Mqdkmk07UZ0ts Lar984LE76XyqnfxroeLqB4px585IhBcbiktgYbIW13u3d+rMouNtBklBGGb38nejlkV nghg== 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=7hFFxNgh5ARUbIYzJoJMVIljXfcRYd+7pJihQpGmD4U=; b=NaAUgsm7BVCwn2JT/Y6cBrR1/qF5bvlBK7Zekpi+f4Tpv3bdoBsUlx7uDpTRj9Ps30 YnWG0oCKK05awUoZRt6Op9C+gr7GZ3JEBA5LBICzZaNi1EvbjzIfcFCwgvHQ1ritHl4T ZOGcVMlrf89er14z6T7QP0pC/5S4qB/AFgEiUho2/kaUVPNfl72lNuDBQYSnKUsF75FP Alats11WaroXZmQI08sb3MPzWvoJE5lIyg9PXbyaTqKXH7eAdoWX60AwARgk7vUm2Sej q0C9zClWA2lgkQrRCog0t+TbtS0PKRLu/r9UWQ9UhW7bJK+zgwfqGeLy2jhA1hc+DxN2 DCtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=Nle6OdqB; 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 c129si22223888pfa.102.2019.05.07.19.57.03; Tue, 07 May 2019 19:57:19 -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=selector1 header.b=Nle6OdqB; 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 S1726722AbfEHC4M (ORCPT + 99 others); Tue, 7 May 2019 22:56:12 -0400 Received: from mail-eopbgr10050.outbound.protection.outlook.com ([40.107.1.50]:39299 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726371AbfEHC4L (ORCPT ); Tue, 7 May 2019 22:56:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7hFFxNgh5ARUbIYzJoJMVIljXfcRYd+7pJihQpGmD4U=; b=Nle6OdqBWP/9Df9+vGgSHt7mSj3daihc++NUg0oQcUd+nkrKDc+EvogHPAOnAVIBuoJnX00KGO756po7WqXUpeC5Hrf9KW9jdoRNX7UfOFwaPbfiSRK4c0mljFxNle7xeDmQYKYpdpSpB97T9v8TAIPeEvWWalFFE1LedlTIBIc= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5153.eurprd04.prod.outlook.com (20.177.40.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.15; Wed, 8 May 2019 02:56:06 +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.1856.012; Wed, 8 May 2019 02:56:06 +0000 From: Peng Fan To: "robh+dt@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" 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 V2 2/4] nvmem: imx: add i.MX8 nvmem driver Thread-Topic: [PATCH V2 2/4] nvmem: imx: add i.MX8 nvmem driver Thread-Index: AQHVBUmUyhPYZQPb306ccqN8amt06Q== Date: Wed, 8 May 2019 02:56:06 +0000 Message-ID: <20190508030927.16668-2-peng.fan@nxp.com> References: <20190508030927.16668-1-peng.fan@nxp.com> In-Reply-To: <20190508030927.16668-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: HK0P153CA0028.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::16) 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: d5b684d1-dbdb-4393-37cd-08d6d360b732 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:AM0PR04MB5153; x-ms-traffictypediagnostic: AM0PR04MB5153: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0031A0FFAF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(366004)(136003)(346002)(39860400002)(189003)(199004)(26005)(1076003)(68736007)(66446008)(14444005)(14454004)(2501003)(66946007)(186003)(52116002)(305945005)(102836004)(7736002)(316002)(66556008)(64756008)(66476007)(53936002)(73956011)(25786009)(7416002)(50226002)(8936002)(5660300002)(4326008)(71190400001)(71200400001)(6512007)(478600001)(54906003)(110136005)(6116002)(76176011)(3846002)(2906002)(36756003)(81156014)(81166006)(8676002)(86362001)(2201001)(66066001)(6436002)(6486002)(446003)(11346002)(2616005)(256004)(6506007)(486006)(44832011)(386003)(99286004)(476003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5153;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A: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: ZcSX9qfXRC5aiZaQ6c7zv94SCGPiBPYxyaOv/kJ+1rIUeda1CerOdpK69N3NJGsQfUJNoHEtRKZCtbqip1gykewLDXd5SBcuFx6cftYVqRJI9aqwiQpLxVYiXjtgo7TcCT30uMqTgABYd63KZJzSFz1GsUa5rDV2FPVqUBLMikkh6604d9dXgt8T39Y4ROHPnn3TYCy4Mn8msnT0IZlQfI6qWFtqYg6Xpdn3e9xV01K1IFsLSYoyUU+KBWE3pGIyt+EccbFGGhvhjgRYGPzy4a/mfGpbHfw4UAvKlm/WIJN5o9d1p+9UB740R3hx5/jzH3pFsU/ES1s2F+rikAlyWjH4MzrRAu//UhCXvunxJ+8+OfwUBoDT2jJY+UPnRpicOSR5xPT8aymf/Z5pYoGG/q0+7KYQKf+JiSjsd3jdnCM= 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: d5b684d1-dbdb-4393-37cd-08d6d360b732 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 May 2019 02:56:06.7864 (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: AM0PR04MB5153 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 ZWFt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