Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp198729img; Wed, 20 Mar 2019 17:52:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTytsEDgzvT2GpnPAAQhCN1m5PXqlyZNqZKgbSOWUi31iEGKCpDaQDG1PL+zQ0DvoHPKGH X-Received: by 2002:a63:3185:: with SMTP id x127mr793880pgx.299.1553129570805; Wed, 20 Mar 2019 17:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553129570; cv=none; d=google.com; s=arc-20160816; b=Tr5w+6AdvgOwMH5zekg3FgoO9KcObN6MK2v/Gq6yaEYw4DWUf395BSVPb0bM/YyHQu Y29pLGDNRX9nTVE2gyCr9anSiLtVU5C96NAtxItObCT/DxXkX9vqq70stgRhDzPoKxKB UQwVg6u8T1PNV0cjcf8OKWYqtIxXYaxWcblpL7j9T/1N5wCc3umMF46gZgJpep/+kpFa U78mS0bXquyataT9D7/11TB3wh/TNK3CwN50xfPwbDBb8xYlWQ5poCH4zqbffikaQZ9c p6P5aODxohy2f1aXR3oV/6DsLFAbIByaMZ/ByokVsTg8nnoW87c5LAf0wxl3C5iTzHmZ ysMg== 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-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=e7cXNCS+pkTNOKVb2JJsexsmUFzl7OYIwLrRr2MF8BQ=; b=olrgm1Btzrdg6mwaGUd3BfjD2/wqrvTF2l8N1dbq+czNTC/Zs4/FPa/kWcN+duwral RuWux5LeoMY8MlgvuSGMfNS1GhaiAtb7PH4k4jm5V4+Y0omlyWx+DhC0mANZ4TAUAvxH T6tLk1MYqtoufNVJkqFvzf+Y+AWs3//xI0pBzE9LSV9a9TrcbFuvpsWQYq/Bu9YT2WgI dwnRUQvQBISY/KmgIHHF4MeDGxa+70AHt3rQjFL5EShBNx2IQFuhuViXX096GHXMx1Op neEAdzyck0Ey4/9O77wmtvYUKd4UN/j6dTt94gbWzaKckW8pjGNagCM9UNf+4hJVU0sK r7hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=uNK9QBol; 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 t3si3053795plo.203.2019.03.20.17.52.35; Wed, 20 Mar 2019 17:52:50 -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=uNK9QBol; 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 S1727538AbfCUAvx (ORCPT + 99 others); Wed, 20 Mar 2019 20:51:53 -0400 Received: from mail-eopbgr10084.outbound.protection.outlook.com ([40.107.1.84]:12285 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726169AbfCUAvx (ORCPT ); Wed, 20 Mar 2019 20:51:53 -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=e7cXNCS+pkTNOKVb2JJsexsmUFzl7OYIwLrRr2MF8BQ=; b=uNK9QBolE7/vetiUdssilWo9nIenOGbkf3NHHRx2ySrIEfWm9M/uQ4HEns9+a9cRzySA+EBrPZJuFfaaEdJpmE0FwRolIenyRHg4N3CxC8Y4F5B7r2dLdm3XtEzhWkJXq9R7/+fiJgMN9EZ2vBG8TG6IyeGSiV9CDg8i1cXwgf0= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3738.eurprd04.prod.outlook.com (52.134.70.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Thu, 21 Mar 2019 00:47:57 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::f1b4:a1fb:cfd1:3f08%7]) with mapi id 15.20.1730.013; Thu, 21 Mar 2019 00:47:57 +0000 From: Anson Huang To: "thierry.reding@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux@armlinux.org.uk" , "stefan@agner.ch" , "otavio@ossystems.com.br" , Leonard Crestez , "schnitzeltony@gmail.com" , "jan.tuerk@emtrion.com" , Robin Gong , "linux-pwm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "u.kleine-koenig@pengutronix.de" CC: dl-linux-imx Subject: [PATCH V8 2/5] pwm: Add i.MX TPM PWM driver support Thread-Topic: [PATCH V8 2/5] pwm: Add i.MX TPM PWM driver support Thread-Index: AQHU33+6HvJ7a8klrE6atPwc3kmOSw== Date: Thu, 21 Mar 2019 00:47:57 +0000 Message-ID: <1553128960-17923-3-git-send-email-Anson.Huang@nxp.com> References: <1553128960-17923-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553128960-17923-1-git-send-email-Anson.Huang@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: HK0PR03CA0087.apcprd03.prod.outlook.com (2603:1096:203:72::27) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: effe3b1b-c4ef-4bb0-3f00-08d6ad96dc66 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600127)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:DB3PR0402MB3738; x-ms-traffictypediagnostic: DB3PR0402MB3738: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(366004)(376002)(136003)(396003)(199004)(189003)(11346002)(53936002)(2616005)(71200400001)(486006)(3846002)(478600001)(476003)(6486002)(8936002)(6116002)(446003)(36756003)(66066001)(25786009)(102836004)(14454004)(26005)(7736002)(110136005)(186003)(99286004)(6436002)(7416002)(81156014)(4326008)(76176011)(81166006)(305945005)(6512007)(97736004)(2201001)(30864003)(105586002)(14444005)(386003)(256004)(50226002)(2501003)(68736007)(6506007)(8676002)(86362001)(316002)(5660300002)(52116002)(106356001)(71190400001)(2906002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3738;H:DB3PR0402MB3916.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: 7zrrLNwQjraZc/CNS4sho9kSlxg3b/Z1ZFdzZ1i7Y8d6u5+YSIJiaQq4mkLEm67/VvGzvlSKdvkCMlwOKKaNj5iSig3nTWP29Nxz9W2KZPGFI/m3xzKjIPGbBEG46aJaE2gleeuMPS+h9j0NM7fYk71d2Z6vUkke05fj/rq4g7176J5IkPoZ1frrgFmez7+Cnzkh+1GKI1lftP+hSF/ztdEMyRirR1UhgTyyLef8gAEgkpiuvzXe2+Fva9bkaaluiMCeMUWHWL+LnAqUbhAGezaJM/sitLBm3ht86EqxyUwxTZyzihyE2c0Qp9lpHIDuzSwezUkjna2YqWzRvv7DTY0qKngX7fdxKNaijszfTbsAKS1Xe7ZoHopELUtEh7jGz/g/J1fdjoyALvNFAx6hJ7JItXJH4F5MT1rBVSMIpgA= Content-Type: text/plain; charset="utf-8" Content-ID: <20DCE4BB91073B45B512D583AAFFA8C8@eurprd04.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: effe3b1b-c4ef-4bb0-3f00-08d6ad96dc66 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 00:47:57.7484 (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: DB3PR0402MB3738 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWDdVTFAgaGFzIFRQTShMb3cgUG93ZXIgVGltZXIvUHVsc2UgV2lkdGggTW9kdWxhdGlvbiBN b2R1bGUpDQppbnNpZGUsIGl0IGNhbiBzdXBwb3J0IG11bHRpcGxlIFBXTSBjaGFubmVscywgYWxs IHRoZSBjaGFubmVscw0Kc2hhcmUgc2FtZSBjb3VudGVyIGFuZCBwZXJpb2Qgc2V0dGluZywgYnV0 IGVhY2ggY2hhbm5lbCBjYW4NCmNvb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