Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp31231ybg; Mon, 27 Jul 2020 20:53:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEiVuq2Ltcs4lEPBJ+I3jG9LFJz3AXrdMvZzv2tOIi4sdCff5vG/ozPEiUrjicf8QvNpJR X-Received: by 2002:aa7:cb15:: with SMTP id s21mr9587657edt.175.1595908412968; Mon, 27 Jul 2020 20:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595908412; cv=none; d=google.com; s=arc-20160816; b=PLuVCyFes7G9PT0q0XtvITn99MEPoL1VzCMoGXOjHXsD14Y2cUzeCME5OnwwLCkFIw GqY/G4YaOsW/CPMVONX7Syf+YCDiY23xDBR0BpXu9y0keSkqNs70gJVq2rgMKMd2utUr RJuAqUsahzoB/sY75HP+mfUPxnNOUDdr06SqC3TCr0JCUykFeTQdmiJWUdQVMBLkk4wS kDzz74fbvnnsc75b0mYPdgRr/ir7gvvEp+jiqXNBQFYnquw2CqphnnhXPLbHLwjsbjuz vn9puIk46EK/do2XLM+SyaeA/WhIEKx4pqSYW/cvdjK2DC4wOrQAUspagHjSaH+kWfrV xW7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=QR+/MpoDcsqrS9Azz9EzzjtJ4RPJuMz1tlMT/z3WZVE=; b=eS0hEizftggN9v+GBxPipQAGq4/641e1n/IvR3xm50LI8vlKjvfzrCYJ808sbE2YuM /Ho+SMs81ekz4WSw+q0Z0drMrPv6Eg19iUQ14Ds67h7kEWrxi1DWmbzDcPgzVIm1zaw8 F0d+v36FfBp+Xjw3BDRdIlp+otBPwrkLgwmm7p2dSd/jBx0zjNmW2n/pAQ5x7MkaFA+x mI7/OwCOU3EJdfMmhHJLnBOxg6AXUk4uR2h1uElNuHEovrPxdLyZjlSwsN6UPVE62d4H /AMRF8r2DX+TgUCsmyHRwPuhNQ7J08nBi2BoRW1JFMcQ7Xmm2NI0EGi+U+n7t+fZuhC+ 6rOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=UMRaHNuz; 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 g26si6708986edv.376.2020.07.27.20.53.10; Mon, 27 Jul 2020 20:53:32 -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=UMRaHNuz; 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 S1726854AbgG1DwU (ORCPT + 99 others); Mon, 27 Jul 2020 23:52:20 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:20279 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726797AbgG1DwU (ORCPT ); Mon, 27 Jul 2020 23:52:20 -0400 X-UUID: 6b1cc2edf4504660ba448028bdb1a6f5-20200728 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=QR+/MpoDcsqrS9Azz9EzzjtJ4RPJuMz1tlMT/z3WZVE=; b=UMRaHNuzWeZtOL2aiClm16wy9ovjrvX7X0H/DG8M88ALVDTfu18GE9Xs0XdGxDWmt9uxvBHyUeADIGGUL0sNrFc8o6Za4D7WSr/p+N5QVNmJiopMJkKql13E3fZIMUDQQ2v9TO8njh9I7GlhhZ+m3PLlgipv6SXcPeYlMW08G0k=; X-UUID: 6b1cc2edf4504660ba448028bdb1a6f5-20200728 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1920253365; Tue, 28 Jul 2020 11:52:07 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Jul 2020 11:52:04 +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; Tue, 28 Jul 2020 11:52:04 +0800 Message-ID: <1595908325.1388.8.camel@mtkswgap22> Subject: Re: [PATCH v3 2/2] soc: mediatek: add mtk-devapc driver From: Neal Liu To: Chun-Kuang Hu CC: Neal Liu , Rob Herring , Matthias Brugger , "devicetree@vger.kernel.org" , wsd_upstream , lkml , "moderated list:ARM/Mediatek SoC support" , Linux ARM Date: Tue, 28 Jul 2020 11:52:05 +0800 In-Reply-To: References: <1595303971-8793-1-git-send-email-neal.liu@mediatek.com> <1595303971-8793-3-git-send-email-neal.liu@mediatek.com> <1595389756.20193.12.camel@mtkswgap22> <1595484707.26237.12.camel@mtkswgap22> <1595573719.24412.9.camel@mtkswgap22> <1595819152.7630.13.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQ2h1bi1LdWFuZywNCg0KT24g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