Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp233104img; Thu, 21 Mar 2019 18:49:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPd7t9+CjuYnO29f9Imh4ezQ9GV7GymH4uXuJ6V6N6qiBlVpyZ5bv4/SoIDvWuekvsTQ7S X-Received: by 2002:a62:2046:: with SMTP id g67mr1903926pfg.121.1553219366947; Thu, 21 Mar 2019 18:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553219366; cv=none; d=google.com; s=arc-20160816; b=czl6iIzC1rRi5fCI60f3TFC7mdC59bat6k6no9JNWhohO3W3GaP7jTjcN+L8wdXhOc NyYrdL2P5Tcqxl577ZA0dBhmU9YPLAkNsqyC63FKABeBo6OsnpM5HtA83TBwnqql/g4f 0iDhiRI7D6DHoXeP+n6RgcHy3if4ECZQ9Etrxb+xN/SNBXO0xAiOsiogHUqTb9LH4t2C DMLu7HjPB23oHnuNHcIdA7YrjcdbYOxlaalOYVHa53djy3aYDb2zVdgoMyO6b1uXY/MB 1rUIxxCzYISql/PPaZ5sEKwIgMCzB5fnQ1BTd+zWfYv4gjkDz4bdy9b5K7AhYFatK5nN oJUA== 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=Uc+bKzvtUg4pPh8cJTXcqhYJsjREhd55oBNcYQik6nk=; b=OQO2jGifS4sJvUgX5pUuFktwUi2meCzb+T4iKdsqSX0IsltHpTvbPNm1+q1ta9Qdb4 53xnqOrii/657gXM5oExGcpTuYTqeNvaVzgI50WfUjTtLFDNwP3HO5B73mhcaYaR3shZ qn/rKKOE5kmWi57dILTdZ+Lt373CoIGKIboeqDPipz1pOuxoanNiVa+hZB+vMY3pK/d/ 13EiMb3q4eYBHKWaUw/uGy4YbhDNqyZm0DWG4t/HVifuiHqqxxec5ZkIyr4rN8ZXmXFZ Zwkit2SKJ0oJrjsBh+j+sgmF8H3k24tyF3lldi8lSRztTqZcHefI9i0CxzbFyAcpQ6k5 ucgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=BPsKdPzs; 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 d68si5445211pgc.538.2019.03.21.18.49.11; Thu, 21 Mar 2019 18:49:26 -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=BPsKdPzs; 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 S1727667AbfCVBsX (ORCPT + 99 others); Thu, 21 Mar 2019 21:48:23 -0400 Received: from mail-eopbgr00051.outbound.protection.outlook.com ([40.107.0.51]:26020 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727511AbfCVBsU (ORCPT ); Thu, 21 Mar 2019 21:48:20 -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=Uc+bKzvtUg4pPh8cJTXcqhYJsjREhd55oBNcYQik6nk=; b=BPsKdPzsV4TDXH5bqxAm+aJJk6ShIwHIiYjIQ+DN/ddpH1h9Dqi52HskhFjBg1NGxVEY7C6M6COH4VGLHwxL9GWWBQZMzZDoZ6un1tNnBO9N3VW8ihAw5Ue787euC+QRePyV1a0TZXYY4sNECBDe7N2IAnNY1Rd0wfr76yYsT0c= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3754.eurprd04.prod.outlook.com (52.134.67.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.15; Fri, 22 Mar 2019 01:48:12 +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; Fri, 22 Mar 2019 01:48:12 +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 , Robin Gong , "jan.tuerk@emtrion.com" , "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 V9 2/5] pwm: Add i.MX TPM PWM driver support Thread-Topic: [PATCH V9 2/5] pwm: Add i.MX TPM PWM driver support Thread-Index: AQHU4FFOpecAv9hHzEalsnukYYli6Q== Date: Fri, 22 Mar 2019 01:48:11 +0000 Message-ID: <1553218974-20464-3-git-send-email-Anson.Huang@nxp.com> References: <1553218974-20464-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1553218974-20464-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: HK2PR02CA0172.apcprd02.prod.outlook.com (2603:1096:201:1f::32) To DB3PR0402MB3916.eurprd04.prod.outlook.com (2603:10a6:8:10::18) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.67] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cf029ce1-f613-4e23-4f87-08d6ae687110 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:DB3PR0402MB3754; x-ms-traffictypediagnostic: DB3PR0402MB3754: x-microsoft-antispam-prvs: x-forefront-prvs: 09840A4839 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(136003)(376002)(39860400002)(346002)(366004)(189003)(199004)(71190400001)(50226002)(99286004)(81156014)(71200400001)(6436002)(81166006)(476003)(2616005)(6486002)(486006)(8936002)(36756003)(66066001)(68736007)(86362001)(5660300002)(11346002)(110136005)(2201001)(14454004)(52116002)(446003)(2501003)(7416002)(186003)(26005)(316002)(106356001)(4326008)(2906002)(76176011)(478600001)(53946003)(105586002)(7736002)(3846002)(6116002)(53936002)(102836004)(305945005)(8676002)(256004)(97736004)(25786009)(30864003)(14444005)(6346003)(6512007)(6506007)(386003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3754;H:DB3PR0402MB3916.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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=anson.huang@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 5/WTywNUNu9F+JcryyypHFoMeVlH6PYmOIpW6GmJfcsBRka5x7gv6CeM+W7vuXwwdk1D9mawe9y7gLLhHLATGyoH+AtbpEtpmMoKTxv0sGpdN/WbGGzHHfhJirdNVKycD4VRKWpvUZ+NVV3o/ZMWLJ0EDKwE2+E59/wqYrmsZD6eby+FMPIjWXFmmwbJtXFNu8irfcT1v/p8/MGbmEbubEytTD3Ly/NUC77rUulZAqcUjEVqtly6iWiosAYyRu9XMLLuhRa91rrczIlvsPR/XdO9YlGcs8h1o0fx1RqKU896z2ddZEk+xQOh2rlGL3xHdPo2u4+BUyyoGvLYKzyjIg1h7N5doV6BpsVDfT3TefhqNszlfIeD7OAu/SQYRjsr7AMF7PaVp5XNRXheu9oxozV8PIZBgrMka/yHw/TyZAw= Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf029ce1-f613-4e23-4f87-08d6ae687110 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2019 01:48:11.9612 (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: DB3PR0402MB3754 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWDdVTFAgaGFzIFRQTShMb3cgUG93ZXIgVGltZXIvUHVsc2UgV2lkdGggTW9kdWxhdGlvbiBN b2R1bGUpDQppbnNpZGUsIGl0IGNhbiBzdXBwb3J0IG11bHRpcGxlIFBXTSBjaGFubmVscywgYWxs IHRoZSBjaGFubmVscw0Kc2hhcmUgc2FtZSBjb3VudGVyIGFuZCBwZXJpb2Qgc2V0dGluZywgYnV0 IGVhY2ggY2hhbm5lbCBjYW4NCmNvbmZpZ3VyZSBpdHMgZHV0eSBhbmQgcG9sYXJpdHkgaW5kZXBl bm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