Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4236085pxk; Tue, 29 Sep 2020 19:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZEcj709aCZWpT2nFv5rw3hOwT0p/eq8Da3zh55Sg5nMpiCyTX6VJj86etA8iuK8TSRQ2z X-Received: by 2002:a17:906:f0d3:: with SMTP id dk19mr602573ejb.202.1601432613626; Tue, 29 Sep 2020 19:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601432613; cv=none; d=google.com; s=arc-20160816; b=iaAhWMvwhg2DpnD9Er0nB/QGCwNPYqMH+CnjK+Efnm0cUruBzK6fG3nfzQMSC1hfDq F4RpfWuA8ACaDteDZymsFNqQP6mRlqFbPc6wvVeHrVSIWRsSy09YYy1HTVSGO0vIpby8 jEYDNflupMy/dbH7FYGtul9dAAFf1U33R8BhZe2PbzOtOyTtjNMSoVRSL8pHy+4HDbt1 z4fHlmC4nJ/K75B/3JrjhqaOTuH86SkunTr0pbXZMpi63+iCzFZK3hySmjDuxkRxvHle iX3Bkq2xsIBQPgUXDAMqIaHsDuqg7VxSwSIvM0PdQPw3PTsEhJA/DVpKflKlNFf92NQ3 jAfA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=AC/DXYeU36EHPrXDYOJrO+0efcpwt/5OaRcV8VbmYaY=; b=d0uRG4fEntkY5TFbe7jdDjGBqxfjEvIddr6wRvkLvE1R4x+NvHnHW23HVYMTC/KEI+ 3FkRCJXjPu6ysuqUm4llAgUDkVbVfQ4BKLlXbb9EzVE3tPUKBbxaEZ04MAZQw7pPHekn WhEJzR5mtlC8jmlQhUjwW+DqTloacCmR74q1cY5OLyZRD0SL1lT8po10tGBkxB9o4PCr rKxsumrhpWxH9I7syCjUdHlpiEO1RsstGUEF3d2BHEJTYwisRKpGajhfOLcTaTBiBA5R bECcPVeEFvh6nrvZYe2KyZhzhftKklnPfWxVlHSG7o7c1fQuyNSLiSjAE6U9qnSpKtCJ fcpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mmmReacq; 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 m14si78397eds.454.2020.09.29.19.23.10; Tue, 29 Sep 2020 19:23:33 -0700 (PDT) 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=mmmReacq; 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 S1729821AbgI3CWL (ORCPT + 99 others); Tue, 29 Sep 2020 22:22:11 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:40279 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729747AbgI3CWK (ORCPT ); Tue, 29 Sep 2020 22:22:10 -0400 X-UUID: f8c009e65b4346d1adc9099ba630e399-20200930 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=AC/DXYeU36EHPrXDYOJrO+0efcpwt/5OaRcV8VbmYaY=; b=mmmReacqpJDjyNK3gdpXhk4iaPBc20DCqX/Gq/8dlx04KI9N6vDect3IQ96/+ZelWdmomtXo1ttHhPq9fVi9SZCVjz9f+ow+YA80pqMox0bESv8M62wwib3PZ+oIKcjLLDQ2bRE1/cw8/9lncour06YbErOKaP4CFVdJwJKB7ZI=; X-UUID: f8c009e65b4346d1adc9099ba630e399-20200930 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2080838933; Wed, 30 Sep 2020 10:22:04 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Sep 2020 10:22:03 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 30 Sep 2020 10:22:03 +0800 From: Crystal Guo To: , , CC: , , , , , , , , , , , Crystal Guo Subject: [v6,2/3] reset-controller: ti: introduce a new reset handler Date: Wed, 30 Sep 2020 10:21:58 +0800 Message-ID: <20200930022159.5559-3-crystal.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200930022159.5559-1-crystal.guo@mediatek.com> References: <20200930022159.5559-1-crystal.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SW50cm9kdWNlIHRpX3N5c2Nvbl9yZXNldCgpIHRvIGludGVncmF0ZSBhc3NlcnQgYW5kIGRlYXNz ZXJ0IHRvZ2V0aGVyLg0KSWYgc29tZSBtb2R1bGVzIG5lZWQgZG8gc2VyaWFsaXplZCBhc3NlcnQg YW5kIGRlYXNzZXJ0IG9wZXJhdGlvbnMNCnRvIHJlc2V0IGl0c2VsZiwgcmVzZXRfY29udHJvbF9y ZXN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