Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp807502ybh; Mon, 13 Jul 2020 01:29:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjuwe2AP8JTmAA0VoeoANs5vq9cf+CyrWWMP8hoOsYDFhER10Ys/RsunmvBaRcuTbd0Y0X X-Received: by 2002:a17:907:2715:: with SMTP id w21mr10556467ejk.229.1594628977514; Mon, 13 Jul 2020 01:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594628977; cv=none; d=google.com; s=arc-20160816; b=byi0khiGSExENntERDXPgQejHDlNtXY1+/2gYb0mcDsX3XYKJjZSPRJbAOTgZ89UE2 7Fx0sTyBegDX5VbVpJdm54bh87wp8l95eNxM2Sln+w9lpeLdoPZ6WVj5nSr+PXd0VAid kwvbY/izrAD/8ysOrfq3+btb/nxc4v+KDFu6HoxEKbgt4JrU4U0uD5yHMIJqKYp0uNID 94d6s8kyz/3pokLZ0UcUhGHLPyCODqtKEGCwmB/q/tkhvtet+lIOdijaLv1vI6Ygx8V5 MjPdCzZHKy+41g4me49S8ND1TrpXh5WVbf8UrjRjRypmvQ9WDC48gbfV6wTDf1iwVhTu 9Cew== 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=bAp3L2r0l+bStR8a6Cp7A6LrBmqQxrRR0lfS2YHQrQ8=; b=QexsJqV/wikBtMJNjeGEP0oBCsrG/bhOW0AVG01YSRymM6iblXofFSTIXfl4QpJ0RL PVGTT8jli7XZbCBgw3qDXXxP7oxKlkPV8YvT+oIbdKkCLfitSPPZhq/bwaUorqEazzHd B9j69s1W9d8hPC+t8d4+PCKhQXiWMWul49m7XGeCR0ZUdtGtN3Ov3Xqxjsk67CMOsPGN OSTvrlttPsVmuAAXbn+7aWm27lec3fL8DFocfviYN+c16DdKF3r78zFAyEGH3KOhq8M3 OQTSPzfWGVdkaaWVZTYDvX4gLfYRGhplQRnsNTRP0EMFfsu7NhRZkOQc3onF/j4X41j0 LgBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QIpcZeDh; 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 h8si7412540ejj.516.2020.07.13.01.29.15; Mon, 13 Jul 2020 01:29:37 -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=QIpcZeDh; 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 S1726725AbgGMI1c (ORCPT + 99 others); Mon, 13 Jul 2020 04:27:32 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:7971 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725818AbgGMI1b (ORCPT ); Mon, 13 Jul 2020 04:27:31 -0400 X-UUID: b3bd923ea6ec4d3fb544467c6410bebc-20200713 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=bAp3L2r0l+bStR8a6Cp7A6LrBmqQxrRR0lfS2YHQrQ8=; b=QIpcZeDh2aQRL/MWCDrwXnaSp3XIYQWkOjKo4con4Cn2eKaNBxQ5aFW7T3he8OF1wZwy8V3HC1jh/AJ6wrhUOeEykAF6/gOTMX+MH+7eiQn8QkkZOWGOzYoGWA3K1iBlSJQc1+LCO7GoNZq018jyw3GhZ1ZUhIi+Gved3xRPwPs=; X-UUID: b3bd923ea6ec4d3fb544467c6410bebc-20200713 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1238615068; Mon, 13 Jul 2020 16:27:26 +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; Mon, 13 Jul 2020 16:27:22 +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; Mon, 13 Jul 2020 16:27:22 +0800 Message-ID: <1594628844.22730.48.camel@mtkswgap22> Subject: Re: [PATCH v2 2/2] soc: mediatek: add mtk-devapc driver From: Neal Liu To: Chun-Kuang Hu CC: Neal Liu , Rob Herring , Matthias Brugger , , wsd_upstream , lkml , "moderated list:ARM/Mediatek SoC support" , Linux ARM Date: Mon, 13 Jul 2020 16:27:24 +0800 In-Reply-To: References: <1594285927-1840-1-git-send-email-neal.liu@mediatek.com> <1594285927-1840-3-git-send-email-neal.liu@mediatek.com> <1594351423.4670.18.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 SGkgQ2h1bi1LdWFuZywNCg0KVGhhbmtzIGZvciB5b3VyIHJldmlldy4NCg0KT24gRnJpLCAyMDIw LTA3LTEwIGF0IDIyOjIxICswODAwLCBDaHVuLUt1Y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