Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp85713pxu; Wed, 14 Oct 2020 21:10:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqiwqKuug6a2lvOQ8KsbCt2lGqEfu3bWYJlRV2RB3cuIQjGdxUzID+UvJwkjCW7mIuNoee X-Received: by 2002:a17:906:7d7:: with SMTP id m23mr2485835ejc.47.1602735029949; Wed, 14 Oct 2020 21:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602735029; cv=none; d=google.com; s=arc-20160816; b=j3F+06tNj3uWG9D80TLB5Q998zlcjASFc3Q4p0iPM23CyYQ/YXNGDk+4tcU+f7aLDV TZtIPnVArjhIQ3LLsW04XL73SBsuoDVOk0tb3fFKVvgeUN1CXC/CSDf6gtokHC5/LLnx 0PzQ4F0VjboyZYtY2Hp78TXXqtNutGMKWJ9dieWrfToOrmPyMciczQ8wmeGN9xkVr3m5 9xUKwdDMHi/H2ICepnubpBlTTa13srRVvImWvuOUNisSg/kpP5uZOXDtek29VlGgwUmY LQmzCMt+WA/jshvOTUOQTr3MTFoEN6JYFVRbzOrU7XPnTTVWWshyWMM9qWiLC2T8gqPC PWVQ== 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=IZyDYUlfeht5gnS9jjLlYuC/tfwrT3+I9bjOaLFcuGg=; b=LkWaPp7tC9AyY6d304AqTAeev6OWE2ffc/NqVqZfslbxhWUFfhSDvMoVVGaU496EWd kkvloEEUZcdzixREvsOFbGAu5ed977iAs01kJ27uFzFULilw92fjGDYzTryKRw23+2UR AKKEIq4XAA3Jj2PvJJmbeSv/UlSasEECV7WN6CuJG0z/iTYuDmMjbqCxj2YE/9yu2009 O/DmiSJt9JvyxIMWEADj+rOOEEhs1sMZ0sgskmYcWrjBRDBFVWdo2fMR6kJ/BpxDeM9F J+VsJ4NL4dDqPdiBFjWyrN+P+U8fPu5IbYJ3tJRXJ3KsA68OAaJLID2dhwf1nQViD0Gg VdCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=O40sYf0U; 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 u7si1140377edo.531.2020.10.14.21.10.06; Wed, 14 Oct 2020 21:10:29 -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=O40sYf0U; 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 S1728636AbgJOCNo (ORCPT + 99 others); Wed, 14 Oct 2020 22:13:44 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:43267 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726028AbgJOCNo (ORCPT ); Wed, 14 Oct 2020 22:13:44 -0400 X-UUID: 8b83bb30da2b46e09444a0fa03bcd9ff-20201015 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=IZyDYUlfeht5gnS9jjLlYuC/tfwrT3+I9bjOaLFcuGg=; b=O40sYf0Uovi/mBipz7ijWA7QZKMwglN5hf3ux+uUDiUFMvkgxwSXrdYhQfbdTv67Dmjai9MQ3KkhYIQvnY3ByIJd5tSRGkwIRqi/eWIfBM1bOKL/B1XlAKTW7ZYNQzgwg3OMcQdsPEzEOfYarmVV/Z4RpX1YroRAG2ZJxkC7CHo=; X-UUID: 8b83bb30da2b46e09444a0fa03bcd9ff-20201015 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] 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 1224820190; Thu, 15 Oct 2020 10:13:39 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 15 Oct 2020 10:13:37 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 15 Oct 2020 10:13:35 +0800 Message-ID: <1602728017.11536.5.camel@mtkswgap22> Subject: Re: [PATCH v7 2/2] soc: mediatek: add mt6779 devapc driver From: Neal Liu To: Matthias Brugger CC: Neal Liu , Rob Herring , Chun-Kuang Hu , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , lkml , wsd_upstream Date: Thu, 15 Oct 2020 10:13:37 +0800 In-Reply-To: <1602124514.28301.17.camel@mtkswgap22> References: <1598497593-15781-1-git-send-email-neal.liu@mediatek.com> <1598497593-15781-3-git-send-email-neal.liu@mediatek.com> <1602124514.28301.17.camel@mtkswgap22> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gVGh1LCAyMDIwLTEwLTA4IGF0IDEwOjM1ICswODAwLCBOZWFsIExpdSB3cm90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