Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp22284403ybl; Mon, 6 Jan 2020 23:04:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxy/vVm4yAn1xnrkdxjJfNfvZ0szsub/ylOb6fUggGtHC41lk227U5oOKufY30yqYljDnaG X-Received: by 2002:a9d:754a:: with SMTP id b10mr122017387otl.273.1578380690405; Mon, 06 Jan 2020 23:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578380690; cv=none; d=google.com; s=arc-20160816; b=nHQ4EygJ+dOkgr354eunK9PDM1FMNn19nLTXN6FBU7uiMYuATYnKcErwU0gEnvoIYx S2XbrAw+0v59Dhz58r6FncZbr+f0R9CVchbyzIwxKccp+Q/LFPyzSCp3/ExKoBfcykJD PlneX29Qj3twUdQT1IX7o0MzlTDTv46VJDk4Xy97ZgLzdXYDfF1S5XQb2U6rOg1REfbz rAFlNf1adpByUAtHIy87c6ZITzFlIP9XfLYpdg4cxDC34WHHrPUceQx+fLTRuZUO0ST7 yt6P6a0VMCewp2/GcafZgVBdZ0KqCR7+sdJwXIaDsK4e2gOsE1hCsbqkhAof/bblwT9G W+fg== 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=VjjSHPgZ0wy2flMgNuu3m046BjiufOod+qrlXQt1vkw=; b=OgqkYy9VIy12IhnBMH8fbrdE8E1ngKVEypFsn0x3bB0I5zD4ALDiIOX6dMpKVY8Vkn oDguMTWgpv+8VWaiY8PaNjEnHhkAcQI7K9c9KmINFfF1p00f2kHJ3ORXw2d9Cq1cgkOF 3yY5PEXbn2g5vljU5GWYTsoULMI1PmGI5vWNIzGIUUKlWxnZrlzRqFTJrK/pyZ6/SaSy ruNf3DQTsveyn8hBQFJddfxoHPiGvy4LHpnKGTzHKr49MbDnzePcRB7viQofYQoW/4Kp kWFAC0fa98PR0yC9HZD/GVCzIX6KJpoI+hbt/Fqs4+adAv5TVtkqARy/QrpTI/7xReyk Ep8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Kni1eguz; 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 x142si32155815oia.220.2020.01.06.23.04.37; Mon, 06 Jan 2020 23:04:50 -0800 (PST) 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=Kni1eguz; 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 S1727599AbgAGHCg (ORCPT + 99 others); Tue, 7 Jan 2020 02:02:36 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:50048 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725920AbgAGHCf (ORCPT ); Tue, 7 Jan 2020 02:02:35 -0500 X-UUID: d6dbfff413af4dccb61f88a8ad2c6fdc-20200107 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=VjjSHPgZ0wy2flMgNuu3m046BjiufOod+qrlXQt1vkw=; b=Kni1eguztIKmj7GAGBPZKWoE696/yHhyP3CAeUhW4kqvRtiDe68ANEJwnO2i/7u6zmDVTfTZiO7HNzHT8fBY5wGOENT+V/2s5ex2ti+2ilu/QOVkyXVausWhq8y7L2NID6SLX33Idll4oVUkbnQqtywnXrOUyLO2Y7Z/MxAG5fs=; X-UUID: d6dbfff413af4dccb61f88a8ad2c6fdc-20200107 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 500436095; Tue, 07 Jan 2020 15:02:16 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 7 Jan 2020 15:01:45 +0800 Received: from mtksdaap41.mediatek.inc (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 7 Jan 2020 15:01:09 +0800 From: Roger Lu To: Kevin Hilman , Rob Herring , Nicolas Boichat , Stephen Boyd CC: Fan Chen , HenryC Chen , YT Lee , Xiaoqing Liu , Charles Yang , Angus Lin , Mark Rutland , Matthias Brugger , Nishanth Menon , Roger Lu , , , , , Subject: [PATCH v6 3/3] PM / AVS: SVS: Introduce SVS engine Date: Tue, 7 Jan 2020 15:01:54 +0800 Message-ID: <20200107070154.1574-4-roger.lu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200107070154.1574-1-roger.lu@mediatek.com> References: <20200107070154.1574-1-roger.lu@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 VGhlIFNWUyAoU21hcnQgVm9sdGFnZSBTY2FsaW5nKSBlbmdpbmUgaXMgYSBwaWVjZQ0Kb2YgaGFy ZHdhcmUgd2hpY2ggaXMgdXNlZCB0byBjYWxjdWx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