Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp37076pxu; Thu, 3 Dec 2020 18:38:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1HsIINlGRU6CtHmmQJo7nwwoSokSHlrAxxpcKEMd7pjYs2pAjge1EbtlklanXb9A5WVe5 X-Received: by 2002:a17:907:2116:: with SMTP id qn22mr5176936ejb.483.1607049518566; Thu, 03 Dec 2020 18:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607049518; cv=none; d=google.com; s=arc-20160816; b=y92/4go8lWP0BB+Srr5Q5AgI4DHwKRN/ntQU0yf2mGkNoCu5oYCL7QSwE8LVDUysRf BGSunRwV0l5YAXOCoShzPwLXs2GSQsuaOWY0E8B3RsK+aj7iP2mmc4x/sRN2SusjFwHO exFpVKeiezZVgcRuRgbyVhfntmnZfzAJF8N3FAqVLP+yHHcigTqx7whjLM9M8DYKCPPY igU6uFzW52GUJgyE8PaxyPOdLpNLFvXgLIWsIfjwuM9HWigDIiUxkJU+2ANq1sLzTqAc L5/QnjPQGzps38bwYBKsnV/9htsBALvN58ZaYSuffCHwTWX03jJC1q8A6BjlBTSG7hJm CrOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Ks0giwSuTJtBdXjdEkWwvc1tFrljUySYf/NOC1MuX90=; b=gr7QlsNbjKARCMb4cZY1LM10/zG7D6SAA6agKl9Llfn9UhVTtLkGIEU9rYGm9uxbyv 5v/QKfQPbQgER9gcdRVHWQVkTi1aHqea9T6QEwnHUeiOEWUvbdqrVPy8JPTYoZoU2ljE 1ISRGU40M4/JOFBsXUP8OE2f3B/74lz4gG6FZkLYT2Xo9E3m0rPpSOzlFhWByPX6EF/r kLKsHcrVbGjdCF9FKBCpsy9S//8PKCXQ59eJJVgQJmJZiaD1ICrJKXmaIeqEAem1TrJc wYd4gkAMt3dFdFwGFoGrX2XQw3I3GaJzBl6889TiP+oWy4JG1Bjb20mU6s1TdOlYWEv7 H88A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=f1Gjgy+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r23si2091523edw.310.2020.12.03.18.38.15; Thu, 03 Dec 2020 18:38:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=f1Gjgy+X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725847AbgLDCfX (ORCPT + 99 others); Thu, 3 Dec 2020 21:35:23 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:8034 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725986AbgLDCfX (ORCPT ); Thu, 3 Dec 2020 21:35:23 -0500 X-UUID: 34378544bbb3419f9d5c6405f4f73293-20201204 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=Ks0giwSuTJtBdXjdEkWwvc1tFrljUySYf/NOC1MuX90=; b=f1Gjgy+XFNvSTsfTww8P93GO6oaRbccsxZEQ8nXHtPyUirAn0JmFE8MAK1f6BmMnpamhB66qq2slCEqZRjJrk+UipuXpEB+AjT5Nw5Gie526VQdOGI7ovHRFHCZi29lgu5ntpNMTAFPd+iFepT+nWJu/qUwDtX1aaLHLCa4hlTc=; X-UUID: 34378544bbb3419f9d5c6405f4f73293-20201204 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1974338625; Fri, 04 Dec 2020 10:34:25 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Dec 2020 10:34:23 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 4 Dec 2020 10:34:23 +0800 Message-ID: <1607049263.14806.69.camel@mhfsdcap03> Subject: Re: [v6,2/3] reset-controller: ti: introduce a new reset handler From: Crystal Guo To: Ikjoon Jang CC: "p.zabel@pengutronix.de" , "robh+dt@kernel.org" , "matthias.bgg@gmail.com" , "devicetree@vger.kernel.org" , Yong Liang =?UTF-8?Q?=28=E6=A2=81=E5=8B=87=29?= , Stanley Chu =?UTF-8?Q?=28=E6=9C=B1=E5=8E=9F=E9=99=9E=29?= , srv_heupstream , Seiya Wang =?UTF-8?Q?=28=E7=8E=8B=E8=BF=BA=E5=90=9B=29?= , "linux-kernel@vger.kernel.org" , Fan Chen =?UTF-8?Q?=28=E9=99=B3=E5=87=A1=29?= , "linux-mediatek@lists.infradead.org" , Yingjoe Chen =?UTF-8?Q?=28=E9=99=B3=E8=8B=B1=E6=B4=B2=29?= , "s-anna@ti.com" , "linux-arm-kernel@lists.infradead.org" Date: Fri, 4 Dec 2020 10:34:23 +0800 In-Reply-To: <20201130103505.GA3019533@chromium.org> References: <20200930022159.5559-1-crystal.guo@mediatek.com> <20200930022159.5559-3-crystal.guo@mediatek.com> <20201130103505.GA3019533@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 25E45A4316C76E3EED103E9DBA28B3BC44ABD9990A4FFD7D374985132BAF0C842000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gTW9uLCAyMDIwLTExLTMwIGF0IDE4OjM1ICswODAwLCBJa2pvb24gSmFuZyB3cm90ZToNCj4g T24gV2VkLCBTZXAgMzAsIDIwMjAgYXQgMTA6MjE6NThBTSArMDgwMCwgQ3J5c3RhbCBHdW8gd3Jv dGU6DQo+ID4gSW50cm9kdWNlIHRpX3N5c2Nvbl9yZXNldCgpIHRvIGludGVncmF0ZSBhc3NlcnQg YW5kIGRlYXNzZXJ0IHRvZ2V0aGVyLg0KPiA+IElmIHNvbWUgbW9kdWxlcyBuZWVkIGRvIHNlcmlh bGl6ZWQgYXNzZXJ0IGFuZCBkZWFzc2VydCBvcGVyYXRpb25zDQo+ID4gdG8gcmVzZXQgaXRzZWxm LCByZXNldF9jb250cm9sX3Jlc2V0IGNhbiBiZSBjYWxsZWQgZm9yIGNvbnZlbmllbmNlLg0KPiA+ IA0KPiA+IFN1Y2ggYXMgcmVzZXQtcWNvbS1hb3NzLmMsIGl0IGludGVncmF0ZXMgYXNzZXJ0IGFu ZCBkZWFzc2VydCB0b2dldGhlcg0KPiA+IGJ5ICdyZXNldCcgbWV0aG9kLiBNVEsgU29jcyBhbHNv IG5lZWQgdGhpcyBtZXRob2QgdG8gcGVyZm9ybSByZXNldC4NCj4gPiANCj4gPiBTaWduZWQtb2Zm LWJ5OiBDcnlzdGFsIEd1byA8Y3J5c3RhbC5ndW9AbWVkaWF0ZWsuY29tPg0KPiANCj4gUmV2aWV3 ZWQtYnk6IElram9vbiBKYW5nIDxpa2puQGN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