Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp6310pxa; Mon, 3 Aug 2020 20:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEj7cxU6CQJRg6KBP4ROhJc0Wtx4y18N5nFN1p0TLnJd+mTPIE8Kc8tQrsEpSX+QLXI0to X-Received: by 2002:a50:a2e6:: with SMTP id 93mr17895584edm.147.1596512664495; Mon, 03 Aug 2020 20:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596512664; cv=none; d=google.com; s=arc-20160816; b=uJnGUxn6YQMGgNbePgmmBu5TA+npxRXyFRIhaCrUz4cWfNCltBaOPYbUB5Sa4vlDUB fF4cvorqc0aS/5aPZ1i/i5aAPJkFhnga8I1BpOeXDjWEhuQObdwmTWy2agz9lJbN+Jyn G8Nipee4JWyEhA5J6hyjS9fWYeRvYDReskgjPrEvpW0QyjKH7UaqNoLxEwn2Lh1XV14e tQ9RTwoOfopbbJYN8Bbxo4xAHqYClTzmkX4IkZaBc57/GWUf6M+zgjSJcKkLHfgazfU8 EDijX5mUw1HK23c+vsdoH+51EMIP7HmM2+tGr4LK2VR+Avfb8lKEUVc2XKdQ4n8Hiu10 zn9g== 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=O4HieeEY/8oHkefoBVUxfjidEgr1ISPuBcVDo53jAPw=; b=ByaZr48787TEVF72L8cVTTsFubA4ZygZ+WVxvnjlFVG8+ZkTh+EeURphVbZj2pwgz5 EJOGZ8i0Mr9iUCqcdl5ukdqL270ZN4rCedv/yAdh1DsvX4Bu6tAz2YwaOqkuRM7uhGR2 NMh9uf/so/rf9Gxoxdo2O8lHfhNJ4InWuQ+/Cz30yizmO5LwGEadqH+G94aL45dGdH9L aV6dprEaJ1dfDiRGwebEAOeEy4Fbseqhv7CnQfC0JXLkmfE0hcAEd18/i1+3SlXNYeQo 58rnJCqr/QqYHDJ2cgazKAabvSvm4p3F0pha2ieBcOL58BUjPoPJ90vXpVSc9jp64XHz SVHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=n744PmIB; 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 b21si1498376eja.19.2020.08.03.20.44.02; Mon, 03 Aug 2020 20:44:24 -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=n744PmIB; 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 S1729764AbgHDDmD (ORCPT + 99 others); Mon, 3 Aug 2020 23:42:03 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:58262 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729721AbgHDDl4 (ORCPT ); Mon, 3 Aug 2020 23:41:56 -0400 X-UUID: 182c14f899ec4cba8fe50d882a5e627c-20200804 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=O4HieeEY/8oHkefoBVUxfjidEgr1ISPuBcVDo53jAPw=; b=n744PmIBDih4lReKt9VgAw0ElQbUexzl1dhy8b51sC9OYeifvv9m9kvy+0hbk/COdL1J0vqU5xjsOkG2FZ6RUAxVxspX//2LsUQ3Bj/SUmR5LVN51gokjXe/nOOSXdfji3ppZT0hFBasc60h92LRmPY8BKUTcOG5vjCVPx9qvvY=; X-UUID: 182c14f899ec4cba8fe50d882a5e627c-20200804 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1754748142; Tue, 04 Aug 2020 11:41:51 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Aug 2020 11:41:50 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 4 Aug 2020 11:41:49 +0800 From: Xia Jiang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Rick Chang CC: , , , , , Marek Szyprowski , Tomasz Figa , , , , , , Xia Jiang Subject: [PATCH v11 07/28] media: platform: Improve the implementation of the system PM ops Date: Tue, 4 Aug 2020 11:40:41 +0800 Message-ID: <20200804034102.22983-8-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200804034102.22983-1-xia.jiang@mediatek.com> References: <20200804034102.22983-1-xia.jiang@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 QWRkIHY0bDJfbTJtX3N1c3BlbmQoKSBmdW5jdGlvbiBjYWxsIGluIG10a19qcGVnX3N1c3BlbmQo KSB0byBtYWtlIHN1cmUNCnRoYXQgdGhlIGN1cnJlbnQgZnJhbWUgaXMgcHJvY2Vzc2VkIGNvbXBs ZXRlbH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