Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp285921ybb; Fri, 3 Apr 2020 02:41:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJbsWu9sdbZbMtEosl2fzJWW9MNrRvEcOR4Y+tVX6LOXsn/XjQIYWl+9jOjHStWZFptMwlT X-Received: by 2002:a9d:8e4:: with SMTP id 91mr6051842otf.130.1585906912138; Fri, 03 Apr 2020 02:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585906912; cv=none; d=google.com; s=arc-20160816; b=GYopw4yeh1zbvnOEagoKvm4vb2ETRx5oacDL5gE+VuOFumNjsI3ABnYTRyfI8FU4K6 kgo+/gbdQDEgeAUrtgV4jP5qsrUPYcGo8fRsDTgOXP6e1vYt/l5LXxJ58O5nLPOENd76 t+yDp0AEjR62y+MnSO23jSwhdGeHv4rbONKsDay9lWbtxRIV35l2YFCisWkE0Luwyv1W FhrXx8CBtIMnE7otQM4vqFnnxCnV1RkZqyAKolfxw0uBGllxD2OJTbnRSD+ZTg04gYQN ewWfUAf64TQ5RQB2+sJcUtrEauWTGkU8kGNAZdwJ1ehGKAdQeJ4AzZYVbd1MX0bnig3p Ki1g== 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=WpMIy3AkmSG9PNgIdQtrXjvW6Cg2lVIoIoOuUGR4AuY=; b=milF9tz8G0q2k3QojlI9SPkEdCcyVM6a7SimoOhNbWN7zKqOnHKZbIjp+vlhdmNDCU 34a9OmBby/gtVKeOqh1KmyP6O3wfPdr9CDZJDdJPgi97TTwvxkjeIDF6CZAyEcr514cd qAGzg0N7VxC5RkDAUUvI7nvorWFRZ+lcZzL/iXImqBprbNHQpA7yYnZXzbzBO1NYt9Lh KoRqkRB2jv8sVt29a/Ny4vFsBkpem4PZdJMbNhJUfGJ+L5y/iHl83PZw7sPX7IcP215M xLXMdkbPt+agn9pWg7zgqoMU51Ngd7PhigUFBEYK8lFYU1sabbD5FUVagZZxFlyS1uEl YsAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=teuH07Fl; 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 t11si3453519otp.314.2020.04.03.02.41.39; Fri, 03 Apr 2020 02:41:52 -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=teuH07Fl; 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 S2403793AbgDCJkx (ORCPT + 99 others); Fri, 3 Apr 2020 05:40:53 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:36555 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2390641AbgDCJks (ORCPT ); Fri, 3 Apr 2020 05:40:48 -0400 X-UUID: 894e7ce08cc3454abaa8a2594a772217-20200403 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=WpMIy3AkmSG9PNgIdQtrXjvW6Cg2lVIoIoOuUGR4AuY=; b=teuH07FlNyw1+PlkFDRCnsPCrsaO5yUushdWq+0RvCiRNw1o2sw61iqyZ+vwZcCr0kCDqxmvI8SiNW47jmY6p/4G7BOlN6RGSkW29fz/geJnu6AhL2B9YQf/fzohaGqvGGURZejN7gyomDaLy9WHBTUCC8wTTrllnBy7QSM2MAE=; X-UUID: 894e7ce08cc3454abaa8a2594a772217-20200403 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 968873322; Fri, 03 Apr 2020 17:40:43 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Apr 2020 17:40:38 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Apr 2020 17:40:38 +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 v8 06/14] media: platform: Improve the implementation of the system PM ops Date: Fri, 3 Apr 2020 17:40:25 +0800 Message-ID: <20200403094033.8288-7-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200403094033.8288-1-xia.jiang@mediatek.com> References: <20200403094033.8288-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 Q2FuY2VsIHJlc2V0IGh3IG9wZXJhdGlvbiBpbiBzdXNwZW5kIGFuZCByZXN1bWUgZnVuY3Rpb24g YmVjYXVzZSB0aGlzDQp3aWxsIGJlIGRvbmUgaW4gZGV2aWNlX3J1bigpLg0KQWRkIHNwaW5fbG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