Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1766507pxa; Sun, 2 Aug 2020 20:41:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya3YW6Z0B3AsYugrr/wbcp2doFtPDjLd/aZASK+1g64J5upgyTT528NfGiGlXzkxYHn9Mh X-Received: by 2002:aa7:c84b:: with SMTP id g11mr13424599edt.292.1596426082993; Sun, 02 Aug 2020 20:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596426082; cv=none; d=google.com; s=arc-20160816; b=rwlVREKeLds6HkVVbOfTgtEzVtIDFq99dl3VLU7/3qOijIkjK+VIJh7wUfVn2Yyses 8uFeLBjDjCJIa3dUJft8L+dLswh78vfMEArSnmC+lG/U4NwrXz0iyffhgmw8XxOIxLjf MMB7lRVCNqbXjtpX/TprXb255Cd9/8Z1R6G8TF8PWSzNeaIe6Hk3OVoWokiYsMsDKzjQ Z2FSdj+W5NcSWULZF7FQHbVl0wApjrZ0TvtYtHuPcMZlRQ7WT4ssHLpzEu7alZT5q1gI zGi2QruRPjv7q1V7XJ5eeH0Iu0AWsTIvQ/jpUg3va1H47qBiAAtiGPkQFd4sf+xXHGfH GE5g== 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=t4IrbC1hgCEtOG+9bekz2MKBQKmXWtq/gbQnQzZLVwU=; b=aTpFfkO9GdbNeDN6YTifRsm+ukQcw1fD+w6UDEqQqe3BqsxxDixAxWfSrXvi/bRAQM Ch2PFV8JePg7rKxg20t0xJ2S863KsLhqGjv7kjaY4zb4tF2tsdxf/eR4h9cCQiCuG0x8 k1VAaIkvijxrk19E6FfhMQZqxpffTsqdT2l2qzREx61ICo4baje7hryLMXRGFYcs8WJs DaUWMZRFLrYoui/tGeJx5axgj3HUqrW3QmQA0x0gOvpqSpph7zyk/HRQ+POGL1dH258X aO/5AhwO5HRfBm1ut45CYHvY5yntbrRnksYyvGEfor6Ii5/WatzHwFAULY1J2XDqRXeq aiIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=E0JunYqW; 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 m23si9731775ejk.621.2020.08.02.20.41.00; Sun, 02 Aug 2020 20:41:22 -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=E0JunYqW; 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 S1726644AbgHCDcJ (ORCPT + 99 others); Sun, 2 Aug 2020 23:32:09 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:53951 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725840AbgHCDcI (ORCPT ); Sun, 2 Aug 2020 23:32:08 -0400 X-UUID: 3f031f6cd0fc49139b76689ac5c9b60f-20200803 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=t4IrbC1hgCEtOG+9bekz2MKBQKmXWtq/gbQnQzZLVwU=; b=E0JunYqW08ACSX6sdgFihkg6KzaejXdqlAqwJseqagsk2wbGRvYxJ8xuvYjtLFD4tHFLZkRcudk+qzsUX4kNFQ0e6CW5ApXCJ6BpTzuy8IvJ8cLH5h3W2N6mEJ4yf5bHXUzvVO8KrAHvLqT0m/5dJddg2PytDKcQAhfDQBfVRN4=; X-UUID: 3f031f6cd0fc49139b76689ac5c9b60f-20200803 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 856245519; Mon, 03 Aug 2020 11:32:02 +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; Mon, 3 Aug 2020 11:32:00 +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, 3 Aug 2020 11:31:59 +0800 Message-ID: <1596425521.22971.13.camel@mtkswgap22> Subject: Re: [PATCH v4 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, 3 Aug 2020 11:32:01 +0800 In-Reply-To: References: <1596010690-13178-1-git-send-email-neal.liu@mediatek.com> <1596010690-13178-3-git-send-email-neal.liu@mediatek.com> <1596163478.3932.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org SGkgQ2h1bi1LdWFuZywNCg0KT24gRnJpLCAyMDIwLTA3LTMxIGF0IDIzOjAzICswODAwLCBDaHVu LUt1YW5nIEh1IHdyb3RlOg0KPiBIaSwgTmVhbDoN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