Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1514926ybh; Fri, 13 Mar 2020 02:36:03 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtBTsv2J2HqbkJXirU6cI39OQwM1b2WuHNHdLjc8JPX3Seebqdha9BOaH6PLYSEgc4iJAEo X-Received: by 2002:a9d:7d8d:: with SMTP id j13mr9432343otn.166.1584092163628; Fri, 13 Mar 2020 02:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584092163; cv=none; d=google.com; s=arc-20160816; b=O4RAbFrBprUr7uGlV+ryRuE7PCFrrc0V06015pfE3o0KfxHtwC+PRObdXQzd5IAnKV 8cyeJrOotHtRSPI0fJfIrtxGmu1X+7cvub25W/3HLatx36njFYNm+8q6LU5lU4bkmK0U dPQnKDvBz9aaQMaWAcYusgXpdLRAl5eL8DdtfTJzu0HGzwhxP112Sologl1yBiH4j6U8 RGjBcvaa+b+x6RkhAlVnoDBfAGfUKpKFTdoSyyGXPip5KXZtA0kyDN276vVZ4Eo8F+Fv zW/bUxyHi64uQG0PaBkXqI0CWwEMofLUVPDu1S1oP1EEHAY4v1YWWwIqKzJ5q7Lm6vZ4 dQ+g== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=WAEDF3wVGcfjsbdKKEpfCJNHsy4ujyOaVE9TmeCQY2A=; b=lJ9L8B9UfidCsYPP5qyEonTnXI8bSonsLnJqy3RZxDDAcrgjizUQceQH2v7YYQxNHf b20CU74r3YhMcrixKh/QMZ0xQpUds7ZlNP7U3sAaT0hvQdLpstSSEpVIjr7GYbRC+X1V EmNOeE9cLHQzkJhgoRG6IrkEauE/lD+LOB4V+RHAZrS/Ds1bPSsx1zNEli/uDo/ADbmN 7iyjQSVgaPmOofMfU7uH1DlNn7B9E2UoHmuACWFYa9rj25c9PvMVgxKdCJx+Ni1n0/ak 2j8YNMZLVsgALmBv7w4JEVLpL8wJE7vtW4WgFbiNa7ZDNaW+bdU/yNjB4+PqxCZLhmff jQgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nacHbsjX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 73si4036107oii.60.2020.03.13.02.35.51; Fri, 13 Mar 2020 02:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nacHbsjX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726720AbgCMJek (ORCPT + 99 others); Fri, 13 Mar 2020 05:34:40 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:9371 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726613AbgCMJek (ORCPT ); Fri, 13 Mar 2020 05:34:40 -0400 X-UUID: b371ff98c1b5471ca0f1b0dc8d36953f-20200313 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=WAEDF3wVGcfjsbdKKEpfCJNHsy4ujyOaVE9TmeCQY2A=; b=nacHbsjXdJLlfaxTDRTb1OXzs03qnpmXZguBtmxNT4Gp4Ck6XYnTTrC2sND2OCaBGftdmeIkZX+xe6zmKA3RU3dg1XiSJ2vj4A8h+Mp7WkHQVGGxy1iJJ4N1FiFk5qbDkgosQzcEuU4HVgT0sg1e7vnoZdUT1wSdMjfi2xZG00I=; X-UUID: b371ff98c1b5471ca0f1b0dc8d36953f-20200313 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 609043105; Fri, 13 Mar 2020 17:34:30 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 13 Mar 2020 17:32:17 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 13 Mar 2020 17:33:40 +0800 From: Henry Chen To: Georgi Djakov , Rob Herring , Matthias Brugger , Viresh Kumar , Stephen Boyd , Ryan Case , Mark Brown CC: Mark Rutland , Nicolas Boichat , Fan Chen , James Liao , Arvin Wang , "Mike Turquette" , , , , , , , Henry Chen Subject: [PATCH V4 03/13] soc: mediatek: add support for the performance state Date: Fri, 13 Mar 2020 17:34:16 +0800 Message-ID: <1584092066-24425-4-git-send-email-henryc.chen@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1584092066-24425-1-git-send-email-henryc.chen@mediatek.com> References: <1584092066-24425-1-git-send-email-henryc.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain 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 U3VwcG9ydCBwb3dlciBkb21haW4gcGVyZm9ybWFuY2Ugc3RhdGUsIGFkZCBoZWFkZXIgZmlsZSB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