Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp820918yba; Thu, 9 May 2019 06:30:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3izIJyZa+BSSHYJikRlJyacWKo9A+oQUWDVthddtIt0oeM4hMj4ENZjvrwlRESOwa9bXn X-Received: by 2002:a63:1048:: with SMTP id 8mr5558339pgq.70.1557408656383; Thu, 09 May 2019 06:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557408656; cv=none; d=google.com; s=arc-20160816; b=XRg6S/MnuQUnS8mzX4A6WM7bVZDgb5kSlZ4piDVx98jaw0YutBfSwikf6Vpg4EEd9R ecoNsO/CHEbQvGaAMTqf5QYFZDPDsunjfTixwGG6GnZgtLrlmbjWMuuKskp3PTuzpEUW cJk5cFzESvCn0NqLgnUDRjhBDa4lbQwF4HryiHReEjzFWtCNJ6zIdbi4zfJAXAAvKWB3 tvaqo+UkA9akZy45Q902QOaILcbDYDSYfh+XfISilJjWz1YMVSksgqzoFq9pLwDClBiO 2wtP/kSxix+bNl8BsxYDYHW6tDLzBIhqgO6SD6eHN7AQkDlaQftZGW8ALEOwlfJs9iT5 t+LQ== 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=nWc5yNdkseNezaHsjsE0t55Te8uHelPF0peBYVN5iCQ=; b=yh+ET4jUiooNEKaF4Xt7crGchLRBd05tzi7okB0qqDymhysIZWmUd681v4K9d2oHAg dnD6yCZ0fn6ai7c+9b20rv6UZCXCG46aIQA6DqGeTWvNRmxAAvIb2d4AXXnDJV49UXQC VhVU2oN0Pyt+MAgu6b+Ez+Fenwthqky+mjor3RyvGZh18WzsyauNuB3NQOWVQF/wWNCL 86Fjg9t6OB5eAJZkMNmqMHkiQDHnlTPI2XZY8611rAJSncYJya2v9rqKz358UrYuIZ7s hkISdZvVR1jBU2DkyWWT9J3jCSuZa0g7MhXTvEL/VtOmyfamY8VLrdlGRDLSR/cz/qpC wWyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="TYKNP/iq"; 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 d25si2905503pgb.229.2019.05.09.06.30.38; Thu, 09 May 2019 06:30:56 -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="TYKNP/iq"; 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 S1726704AbfEIN3i (ORCPT + 99 others); Thu, 9 May 2019 09:29:38 -0400 Received: from mail-eopbgr50078.outbound.protection.outlook.com ([40.107.5.78]:10918 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726415AbfEIN3h (ORCPT ); Thu, 9 May 2019 09:29:37 -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=nWc5yNdkseNezaHsjsE0t55Te8uHelPF0peBYVN5iCQ=; b=TYKNP/iqIrS1LJ4hC6w9pkFteZVKFqzAV1cfQ3p7V7gQlWSmARfraDBPJxt6B3sT0WNwz5owXMZcCmH9qLgNu+HN5tWx3++tpbw7fHfwAH60RXwpUkyDeucW4peN6bZ2auOlrPrAt+xxdVeY+5KGRdaK1O/TDXUgcnYhnKC0TaE= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3673.eurprd04.prod.outlook.com (52.134.70.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.11; Thu, 9 May 2019 13:29:29 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::d035:3bd0:a56a:189d]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::d035:3bd0:a56a:189d%2]) with mapi id 15.20.1878.022; Thu, 9 May 2019 13:29:29 +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" , "otavio@ossystems.com.br" , Leonard Crestez , Robin Gong , "schnitzeltony@gmail.com" , "u.kleine-koenig@pengutronix.de" , "jan.tuerk@emtrion.com" , "linux-pwm@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V12 2/5] pwm: Add i.MX TPM PWM driver support Thread-Topic: [PATCH V12 2/5] pwm: Add i.MX TPM PWM driver support Thread-Index: AQHVBms6d7ygmfwIuUSDUf7Xa7XKfQ== Date: Thu, 9 May 2019 13:29:29 +0000 Message-ID: <1557408252-21281-3-git-send-email-Anson.Huang@nxp.com> References: <1557408252-21281-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1557408252-21281-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: HK0P153CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096:203:18::13) 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: 735adda7-656d-4095-2506-08d6d4825cfd 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:DB3PR0402MB3673; x-ms-traffictypediagnostic: DB3PR0402MB3673: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 003245E729 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(396003)(39860400002)(346002)(366004)(199004)(189003)(7416002)(6512007)(86362001)(2201001)(6486002)(305945005)(66556008)(66946007)(73956011)(66476007)(64756008)(7736002)(66446008)(316002)(99286004)(2906002)(186003)(6436002)(26005)(53936002)(102836004)(66066001)(50226002)(4326008)(76176011)(36756003)(52116002)(81156014)(386003)(6506007)(2501003)(8936002)(71200400001)(14454004)(81166006)(8676002)(71190400001)(68736007)(110136005)(5660300002)(3846002)(11346002)(14444005)(446003)(30864003)(256004)(66574012)(478600001)(486006)(476003)(25786009)(6116002)(2616005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3673;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: v6jHaYcHq6AE/KDJhFn2JsapE92NIOLbcWz+CSLE19bwd+trzeolH9driuhnEmXndPcIbVCntSPPnNIz7uwjk/iGAmFhxFnTFDzqw/zL+pLd08tGwfQ2a+IFoBODVBDUjnNTEViIuW+sEEzWWaqS1Ah8+LqXDWwnxkJAhssxyBVkW9DaUUaGvqwlxT+bE7OaqDX+EDtmstHuIx+dyc8JxkfJB4OxMRQ+cCmmobTKN4wNE1h0ZIE4ia29jHl8DVUTEzCwcbX9tIUM0tgxwwtC08Tr92D6xKATBzU3ORV2yYImoy4ou6xDWIzQlaxA0tRtF6eoyS4k03/0/bjq4U/oddtmpKOVaaWDO6h9TjljexEGq0u643kpd3Z8ck+xhJUWbRJljp2SSL8arWfqxTbtryRQ0AFijKwxQo90TFET+X8= Content-Type: text/plain; charset="utf-8" Content-ID: <7528E1D2B156DA4784BF50ED0ECAD812@eurprd04.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 735adda7-656d-4095-2506-08d6d4825cfd X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2019 13:29:29.4407 (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: DB3PR0402MB3673 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWDdVTFAgaGFzIFRQTShMb3cgUG93ZXIgVGltZXIvUHVsc2UgV2lkdGggTW9kdWxhdGlvbiBN b2R1bGUpDQppbnNpZGUsIGl0IGNhbiBzdXBwb3J0IG11bHRpcGxlIFBXTSBjaGFubmVscywgYWxs IHRoZSBjaGFubmVscw0Kc2hhcmUgc2FtZSBjb3VudGVyIGFuZCBwZXJpb2Qgc2V0dGluZywgYnV0 IGVhY2ggY2hhbm5lbCBjYW4NCmNvbmZpZ3VyZSBpdHMgZ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