Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3442290yba; Mon, 8 Apr 2019 19:46:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwE3DgSIb3NugGKa7CJdMqqunQ+39tCxcShjDvSZHN++TToatcSPfBlXlVocvw+NENVkWeB X-Received: by 2002:a62:8381:: with SMTP id h123mr34084757pfe.226.1554777997978; Mon, 08 Apr 2019 19:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554777997; cv=none; d=google.com; s=arc-20160816; b=FwiZ5phISYULqXh8CBgcGsURLPHNqrHO7XHI/p9tN/iHv1DZNuAuktAlpRC4nSzjF7 6zZ2u3gsFl5KmMoNausF2Ns4nXvn9icNOLo4WTXTAMaSMBQCa1OsOI3nkEywVbMvuCaI VFEzGA7cDZuyTowyOUpJgMym7hNSp4hIt5tiD5CKsgo85PKb2hWzPfcw91Rl9WvZyiyd OpE/R4FgUXWw0XjHnxLilS1a3rKnfEJ8XBaMa2HhI3gBFB9xi2SiUktQ4EKyhLSn7cjA AxENv8BjYNACwzHp2JM0Fja5IZM4Idplks+TMM9X7C4OiTYm1tS0oHF/un9UV3CA4nAi kkfA== 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=sbX5qAr3UEAyWe3LWY10x/NHZJJD+Jky7wW96XDV5W4=; b=a1f1+YBMgpgj01vMRDBqpmwqTv19Id+6W/faA6pEzYpwAJYKn++tcKfeuo/7Gc++Jm 3fIJUdA/8UIxdPEmmKhLnUXKeOwCNeK0i9SGu40Bqa5pY9WJ1IcKx26i8VJGIk+LK4pZ KDKkpWOj8V3Dkx54HYaLr/YZ3voiVtelKSXyfvn4U5c2pcoxp8UVDfmKOAk5GJStyQOr gfraNC7YRS6E/2eHDCtfVyN3LXj8rqWJTXlX374RCJX484PHT0otT7Zj5jaYpjECVH5s MXLKyjCb0IIR04oIuOZ0LAdDubxkcdMOtoxzhTLvZ6YijxOWQFiiMhkixWhILWwRvoAk JGeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=RYLPS16c; 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 q25si27044532pgv.534.2019.04.08.19.46.22; Mon, 08 Apr 2019 19:46:37 -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=RYLPS16c; 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 S1727035AbfDICoI (ORCPT + 99 others); Mon, 8 Apr 2019 22:44:08 -0400 Received: from mail-eopbgr80052.outbound.protection.outlook.com ([40.107.8.52]:4482 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726133AbfDICoB (ORCPT ); Mon, 8 Apr 2019 22:44:01 -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=sbX5qAr3UEAyWe3LWY10x/NHZJJD+Jky7wW96XDV5W4=; b=RYLPS16c8NeBQGn3trWaNAK7pDuddWYeWhWZwm5cr+eIjD9u/oFrqAEqG1eQwyJ083jjHKoUNKFK4ZODiKYjmqMZ/qtfYKRgbv7B0PHmABxF9BlKsifmJw5TLNLyWiTIs6K5Cp+gqrxNVsbkLSwRdN491/CVcDuZa35mlzHYxV4= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3929.eurprd04.prod.outlook.com (52.134.70.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.18; Tue, 9 Apr 2019 02:43:31 +0000 Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::e8ca:4f6b:e43:c170]) by DB3PR0402MB3916.eurprd04.prod.outlook.com ([fe80::e8ca:4f6b:e43:c170%3]) with mapi id 15.20.1771.016; Tue, 9 Apr 2019 02:43:31 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "a.zummo@towertech.it" , "alexandre.belloni@bootlin.com" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Peng Fan , Daniel Baluta , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-rtc@vger.kernel.org" CC: dl-linux-imx Subject: [PATCH V6 4/4] rtc: imx-sc: add rtc alarm support Thread-Topic: [PATCH V6 4/4] rtc: imx-sc: add rtc alarm support Thread-Index: AQHU7n4EdgguyHsDvUib9vTZjNBAXA== Date: Tue, 9 Apr 2019 02:43:31 +0000 Message-ID: <1554777487-31075-4-git-send-email-Anson.Huang@nxp.com> References: <1554777487-31075-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1554777487-31075-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: HK0P153CA0002.APCP153.PROD.OUTLOOK.COM (2603:1096:203:18::14) 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: d5db90f0-37f8-4ba3-d6e2-08d6bc9526d9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:DB3PR0402MB3929; x-ms-traffictypediagnostic: DB3PR0402MB3929: x-microsoft-antispam-prvs: x-forefront-prvs: 000227DA0C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(39860400002)(346002)(376002)(136003)(366004)(396003)(189003)(199004)(6512007)(53936002)(102836004)(478600001)(14454004)(6116002)(3846002)(7416002)(99286004)(97736004)(386003)(6506007)(305945005)(186003)(110136005)(4326008)(7736002)(316002)(256004)(25786009)(26005)(14444005)(446003)(2616005)(11346002)(5660300002)(105586002)(2501003)(106356001)(486006)(6436002)(6486002)(2906002)(476003)(68736007)(71190400001)(8936002)(81166006)(81156014)(50226002)(2201001)(86362001)(76176011)(52116002)(71200400001)(36756003)(8676002)(66066001)(921003)(1121003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3929;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) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: yJ3+BovoAGmYDXk/taipBX+COozKux+/+UAfw3yrYKdNt6IvqmHctqXoUOYWNW9ZBemfZygtEgoEu3qnNhIu4Rhsem5FM/KxH0Zy2pgBIJKHH71a4ZpK9mBITkWB5xetKXQdNq9S9+2vS2+d4gmYah96BwPORv8DgL99G/3OlWrMYSdHHU8NL/6WevsPjxGvoaYF2BscTzz0vxS4bsLK07yLA89B3EoX7i+b67s7xxYOLoHUdUhcMr1MvtJO3I1hcJK+quHFUFHF+Km6UnCWdyxzXJRQhOMrbFLO8/UOufYFxENh9AV41lUU49OSVAM9uRDs72esK35Vh7hzQBylvvct7d7CG07HG6eZnJRYG59VZFptJkvI81Gex2FB1j3abhMliqlA+zxISNbEDSoLfclJmTqBoH8uUgJro5FmSmg= 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: d5db90f0-37f8-4ba3-d6e2-08d6bc9526d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2019 02:43:31.0855 (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: DB3PR0402MB3929 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkIGkuTVggc3lzdGVtIGNvbnRyb2xsZXIgUlRDIGFsYXJtIHN1cHBvcnQsIHRoZSBSVEMgYWxh cm0NCmlzIGltcGxlbWVudGVkIHZpYSBTSVAoc2lsaWNvbiBwcm92aWRlcikgcnVudGltZSBzZXJ2 aWNlIGNhbGwNCmFuZCBBUk0tVHJ1c3RlZC1GaXJtd2FyZSB3aWxsIGNvbW11bmljYXRlIHdpdGgg c3lzdGVtIGNvbnRyb2xsZXINCnZpYSBNVShtZXNzYWdlIHVuaXQpIElQQyB0byBzZXQgUlRDIGFs YXJtLiBXaGVuIFJUQyBhbGFybSBmaXJlcywNCnN5c3RlbSBjb250cm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