Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2299639yba; Sat, 27 Apr 2019 20:28:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfrwGxONY8ySPR2r1KIIiFuWzl/hF3flel6yLQu01wj/yO0Uaxcxm9YPyqA7IIUQ8L5wE/ X-Received: by 2002:aa7:934d:: with SMTP id 13mr10634671pfn.207.1556422128236; Sat, 27 Apr 2019 20:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556422128; cv=none; d=google.com; s=arc-20160816; b=xJPrUTqeANCBEq0KA1RI9qXORieCmNiu03m1v2KXETKlNAMEVR2mxDj8wtPvI/eDJs O4FCgYZbarIqkA7WDshaEtOTbFvsJtUrPVQxbrnfpfir63wvXV/dRRL+yDIQ8dcLnR6D mfKV5DHpv0nfpBsic2/OnT2i7AinuwYvxCrk60PeqoUcHpapwEHXFSI5vSmSAqSx4Z+W sYRoycYdbZ6+G82wjsyotW8cCPxPvcWamKn/VdpHCVdMuztDXTSODHeWbj+HRWXYoIs1 4JOx7hDOlm1+lGxQ03W+FlQ1iRU/Y+7syYhGQH2tYnB+pIU6E8NaldNkr7TSlpK2H2DP pggg== 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=MoWrustM0UiwCXzofxodfOBuh3ClMbE8zgk6YUoYgfE=; b=dTqkbdf4yFZ4va33PwMU7goKcLb4RSrUQPsF0mCEKLCOJG3zzbmglY2JeuhDy8S/Uw tJ+gmoce02MogxTbyV0tvZHn3AI2llEy/rX7zqZujdYwxbTCBjKPq55Yhpw7xxftESGA rli9a4sFaxX0yGzclvlsFO6syH2u6CNLD/5aDgt3/6E/Fu+FF5/kMSf+XWRIz93ptSbq xPS2f+NSzTMDWL1Vt/CoKzPTHqDq14R3QTEumwbJ+OVuobZ5dIKbQ+YziIZQxDiuZFVx DdEu44xQBPBwo0fYrZe5ANUai7YdcAfl80hXJcY/N/PRd2CjwbJJQEjqyZsk7SCiTFfr CuhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b="qI/griKr"; 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 s2si23297293pgp.69.2019.04.27.20.28.33; Sat, 27 Apr 2019 20:28:48 -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="qI/griKr"; 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 S1726535AbfD1D1T (ORCPT + 99 others); Sat, 27 Apr 2019 23:27:19 -0400 Received: from mail-eopbgr130043.outbound.protection.outlook.com ([40.107.13.43]:64350 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726112AbfD1D1S (ORCPT ); Sat, 27 Apr 2019 23:27:18 -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=MoWrustM0UiwCXzofxodfOBuh3ClMbE8zgk6YUoYgfE=; b=qI/griKrlsGC9eg5VYc6S25JrYmnEz4RXGjqIXH1pDpNqQpaH2IzEdbtTTDlLnflJoISsNmmAjwwhRDFJ8NqWbiPF6cYh8Gav8mJqgdzxXtihfyygdK4Ay3+x1jUsGQXywWXyZgCa3HB15iM/G49uZf+/fhb1s5GnpK3cMAHJCs= Received: from DB3PR0402MB3916.eurprd04.prod.outlook.com (52.134.72.18) by DB3PR0402MB3897.eurprd04.prod.outlook.com (52.134.73.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1835.12; Sun, 28 Apr 2019 03:27:11 +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.1835.015; Sun, 28 Apr 2019 03:27:11 +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" , Peng Fan , Daniel Baluta , "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 V2 3/4] watchdog: imx_sc: Add pretimeout support Thread-Topic: [PATCH V2 3/4] watchdog: imx_sc: Add pretimeout support Thread-Index: AQHU/XJEb2AE+bf5WEKUqaf0TfCvNQ== Date: Sun, 28 Apr 2019 03:27:11 +0000 Message-ID: <1556421727-7401-3-git-send-email-Anson.Huang@nxp.com> References: <1556421727-7401-1-git-send-email-Anson.Huang@nxp.com> In-Reply-To: <1556421727-7401-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: HK2P15301CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::22) 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: a2fa1688-11aa-4247-fe94-08d6cb8966bb 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:DB3PR0402MB3897; x-ms-traffictypediagnostic: DB3PR0402MB3897: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 0021920B5A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(136003)(396003)(366004)(346002)(39860400002)(189003)(199004)(256004)(71190400001)(14444005)(71200400001)(97736004)(6116002)(186003)(66066001)(86362001)(2201001)(476003)(2616005)(8936002)(36756003)(486006)(11346002)(81156014)(81166006)(25786009)(53936002)(50226002)(3846002)(446003)(2906002)(2501003)(386003)(6506007)(76176011)(68736007)(4326008)(102836004)(64756008)(52116002)(66946007)(66476007)(66556008)(8676002)(66446008)(6486002)(6436002)(7416002)(14454004)(73956011)(7736002)(99286004)(478600001)(316002)(110136005)(305945005)(26005)(6512007)(5660300002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DB3PR0402MB3897;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: IhUBNCjRZte1/LQ93sR4BmPBU0V0Qov+EIXfKr0W/EYbn8VynFeOJaQC9Ool8IiZGDHvKMahPEwojmuRN+DIhmEi3pmn7LWnFmOFbHrezcHAqXS64GTdboo8BHwyYbSW3nUrfk/nd55bfswK9tFW3yDT7raftSIPPiIBDFuuWtFBpmu15Gf/jpl0UvtitPZyu3qPNsYhb//uKjYhd1Dys5z7B5yhxj8eSsAfg3ycq0UzGEGo+d9ItmjHLBz6LTwGTC0IgfNeX03DgNRI83p55vgp16Pbeulh7TAtaR0SrLIpwOtXXYbAMA3+CjZAmDTfLo6XY7T7+c3nIgxX72Ilxi596xQHo7MtZoINF+cUzPzd+A6C969E3mG+MKm1/i1JXUAGFjBLPoTlR0GwEE6GMCxjSZMDUnDc4N/Ic0briaY= 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: a2fa1688-11aa-4247-fe94-08d6cb8966bb X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Apr 2019 03:27:11.7500 (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: DB3PR0402MB3897 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aS5NWCBzeXN0ZW0gY29udHJvbGxlciB3YXRjaGRvZyBjYW4gc3VwcG9ydCBwcmV0aW1lb3V0IElS UQ0KdmlhIGdlbmVyYWwgU0NVIE1VIElSUSwgaXQgZGVwZW5kcyBvbiBJTVhfU0NVIGFuZCBkcml2 ZXIgTVVTVA0KYmUgcHJvYmVkIGFmdGVyIFNDVSBJUEMgcmVhZHksIHRoZW4gZW5hYmxlIGNvcnJl c3BvbmRpbmcgU0NVDQpJUlEgZ3JvdXAgYW5kIHJlZ2lzdGVyIFNDVSBJUlEgbm90aWZpZXIsIHdo ZW4gd2F0Y2hkb2cgcHJldGltZW91d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