Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1014447yba; Sat, 4 May 2019 19:16:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUf/yCnw02BB1SG5c2WA45winyxMObiPbAW3k5lvpAGnUZpAXZ/S4OpIBxsPNJpwTo5hzV X-Received: by 2002:a65:5886:: with SMTP id d6mr22159073pgu.295.1557022604155; Sat, 04 May 2019 19:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557022604; cv=none; d=google.com; s=arc-20160816; b=PTj9XaYDDFsAe9dNlvRYwxoPsJ3D0CAjTLC9wtD3boGF+xKZNfi8fV1u4tDG71r4zY sOhPlvozi5vExuc87B+aB2M4gfkgrZbi+RqpRtV/KccTK8r5lqA/fTiLcGB+HMUnQNeb yiIH7NOI3ltjxUlXhttHEz7s3gsqvlGxyG5Gp8LbGTkDmjL4XVZ0sC3Y7QgJE2hk6ftV 9T3w3633/MN60SleFk9Q5t7jl4NHyrvO6tqRM1+j6vkMpefTd0RSRSfCKNO/ROLyS8p3 4esWICCqtp8caRVUoWeLstwUoTj8l35ufuIxi24ZHFkktYpNpgOun+GXZdJCumr21sMS X/Yg== 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=0lRq9Skx4F+BiFbJ9UTmSd06o4Rko8cdVr8QBTAyDFQ=; b=IM/lGtBLoIQHHe3fVgroUcH+8v9XqUspjI+Yi+Ur+f4MnfnoWYF6/BIEj3z6E3BDgH QpsLl8cj+4IzK2ISb9zVYGXyeyIv9s74I0fT7lqZTeMXEMR+9PsfvgG7ZfR1JdVWiZN6 gel77/MmkPWoUYuXbXobvALakY/4Aiat8XQ9wnvPWDtAw28tdhGRuUTK1yl/OSSZaOov tR8uacuJ57hDZA3FkP8kpgXk08/KDPom5BsO5rh3WthyDXgGFe6BzikEU9uB+A7NY6sp b1pR5/mViEl1gjc87NSh6IW6/3wMq7nuWjLpAZVT+e1pY4Sjvy3+z/kvb879dkcRSLeh S9HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b="e8o1oO/E"; 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 v18si683408plo.114.2019.05.04.19.16.29; Sat, 04 May 2019 19:16:44 -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="e8o1oO/E"; 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 S1727537AbfEECPg (ORCPT + 99 others); Sat, 4 May 2019 22:15:36 -0400 Received: from mail-eopbgr150087.outbound.protection.outlook.com ([40.107.15.87]:31297 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727314AbfEECPc (ORCPT ); Sat, 4 May 2019 22:15:32 -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=0lRq9Skx4F+BiFbJ9UTmSd06o4Rko8cdVr8QBTAyDFQ=; b=e8o1oO/Ehmo4hu3xDO80h/48ZfoCIbjSyAnFdOgc4U6+hWLNHEbv1sd4bOJx2Fmi4M5o7pWm0dgkUnLME4napW0Z33uosfYck4rbnbqGexuD2ulpnTYfejc7lyjng82Ntukpe5YToP/p4ncVHIwXPA7zMbk6JCG8R22BDyJFd8U= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3721.eurprd04.prod.outlook.com (52.134.67.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1856.12; Sun, 5 May 2019 02:15:00 +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.1856.012; Sun, 5 May 2019 02:15:00 +0000 From: Anson Huang To: "robh+dt@kernel.org" , "mark.rutland@arm.com" , "wim@linux-watchdog.org" , "linux@roeck-us.net" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , Aisheng Dong , "ulf.hansson@linaro.org" , "sboyd@kernel.org" , Daniel Baluta , Peng Fan , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" CC: dl-linux-imx Subject: [PATCH V3 3/3] watchdog: imx_sc: Add pretimeout support Thread-Topic: [PATCH V3 3/3] watchdog: imx_sc: Add pretimeout support Thread-Index: AQHVAuhX3Dci+0ziCkuAahuxTj8vrQ== Date: Sun, 5 May 2019 02:15:00 +0000 Message-ID: <1557022189-10993-3-git-send-email-Anson.Huang@nxp.com> References: <1557022189-10993-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1557022189-10993-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: HK2PR02CA0145.apcprd02.prod.outlook.com (2603:1096:202:16::29) 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: 5a0221f6-f6d4-4cfb-f637-08d6d0ff79b0 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:DB3PR0402MB3721; x-ms-traffictypediagnostic: DB3PR0402MB3721: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-forefront-prvs: 00286C0CA6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(376002)(39860400002)(366004)(346002)(136003)(199004)(189003)(14444005)(2906002)(256004)(86362001)(25786009)(71190400001)(14454004)(76176011)(316002)(2501003)(36756003)(6116002)(3846002)(2201001)(52116002)(478600001)(68736007)(99286004)(66066001)(8936002)(50226002)(71200400001)(6486002)(6436002)(6512007)(53936002)(4326008)(81156014)(7416002)(486006)(305945005)(186003)(73956011)(11346002)(66946007)(2616005)(476003)(66476007)(66556008)(64756008)(66446008)(446003)(102836004)(110136005)(5660300002)(6506007)(386003)(8676002)(81166006)(7736002)(26005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3721;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: /+zuer9pNces6ETef91Xg5b71Vwh8S14uaaiTWEzXP0kIV+9Fwu1//+6GmotyWtE5JXUcLkP168uJSsyw41Yc6Mz5eH7hfAqDcfdD5w5AJiKqfC34+CXUc0npman9N6Qh4jKzyuCRj5C7VozJFnPkbCVHYegOnaAuFqUD68x+cNSfTYZxEjhUXR6jQv6T+S7fdwUIQ3TWjUwdqfQ16lEINixBW4m/i2JLadhkJo1/uEeBPxtnsx21882Rycrfc2hjO6ir0pJMVq03TqA1/1WgSz1limEQqpjVnRA17g4fLh8CtrKXaJypQ2nbxhKE1+X1Y6FAcE4+ypFPsjhH2dlBNyr5HbVJZtYLwYpo5pumQrZEktW8c8D17FigwwvZyngkn4fquEDkh/uTxo7GsdNFgrjmZpueuzLVnisEGrmVT0= 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: 5a0221f6-f6d4-4cfb-f637-08d6d0ff79b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2019 02:15:00.2296 (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: DB3PR0402MB3721 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWCBzeXN0ZW0gY29udHJvbGxlciB3YXRjaGRvZyBjYW4gc3VwcG9ydCBwcmV0aW1lb3V0IElS UQ0KdmlhIGdlbmVyYWwgU0NVIE1VIElSUSwgaXQgZGVwZW5kcyBvbiBJTVhfU0NVIGFuZCBkcml2 ZXIgTVVTVA0KYmUgcHJvYmVkIGFmdGVyIFNDVSBJUEMgcmVhZHksIHRoZW4gZW5hYmxlIGNvcnJl c3BvbmRpbmcgU0NVDQpJUlEgZ3JvdXAgYW5kIHJlZ2lzdGVyIFNDVSBJUlEgbm90aWZpZXIsIHdo ZW4gd2F0Y2hkb2cgcHJldGltZW91dA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