Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp574660ybm; Wed, 27 May 2020 02:44:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylTb57iwTywHtKe8CnjpQYuDvd1dccyz6f5EEfD4npIneSRPEHdNZrfsKJzjzMGrJ6X3eT X-Received: by 2002:a17:906:49ca:: with SMTP id w10mr5369702ejv.31.1590572671313; Wed, 27 May 2020 02:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590572671; cv=none; d=google.com; s=arc-20160816; b=P7DSf0NbRvtpAKOuBy1DErQNfsfGCpMh7NAOKZn9YQ/793ak1bkadSYIQAM7+CkZWo OYHy66eFET2r1j3oJcdcQCIM4fcwsv7u6oPybqaSLHdIpDCt62QE6hswEclau6qGSUDQ YXWdGcmQMRtJUaCPfB1XBouKLgx8BYsquxMk1xxkGYqxQBE62kAYmhPbQEMakwqnyvvt V65PtEx79YayX6yxj1RRo3GkhfhupFLYQiV2S3QvTTXr3g4QyeofReOONyAa7ogAuEdv DhgKI6UED68VROyYvrTecJTKv+ebYiJi8euDZ48oPLzppzmRLQz5GfXCkmHnu2PUGM2I Uqkg== 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=ZKrqKJ1L5uEpCnzzklpqeT5Qk2zFyQCkc/heYv9ITnM=; b=zTuvaeW1gfQAEhDbjoUbO+B8e/BCXY6rYcZbzxWUp+OSBysn54NqtWPouAUhnF7aWZ 6dNxo1ErXynzDLY/JTCif7lPzA01wfI5CGy4STDMsP2EcTI0u4hB4Gdc+4I+ZnDX5yEt sC6JEZ2lOMojNg1grUe4QSSmhgXFP2a2J+ROkdz7iFkACmhyHk9y6kQWoNv3Ln6gWL8e PR2+DRXMaX8L8Iuy9XSXqeX4255pYq5C+ykS5wON5Hq1CqYCg3dFljTjq4Vv1rIf8PAT SQgwGLbob6/GSm5FsT5EDX3vgXrEdULIubJsr7BhG8SDqAXsLpc5E/DS6EDSeK5r9x+k pZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XUpTR3U9; 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 i6si1700009edg.459.2020.05.27.02.44.08; Wed, 27 May 2020 02:44:31 -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=XUpTR3U9; 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 S1728064AbgE0B57 (ORCPT + 99 others); Tue, 26 May 2020 21:57:59 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:47631 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725271AbgE0B57 (ORCPT ); Tue, 26 May 2020 21:57:59 -0400 X-UUID: 2d4d4ee9b12f44809e2b4bc452fe3a49-20200527 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=ZKrqKJ1L5uEpCnzzklpqeT5Qk2zFyQCkc/heYv9ITnM=; b=XUpTR3U9I2ql6YbBD1AN1sf+a1IszagSd55v/wuip50S9/YIF8rA9dVIwyETT7qsAB4UioxxjiJl2jorkFc3bTQscHdkOM5PYG3KJALZhcLw5rs7aCpEHTRlLV/5R55JuwVqICKGca09ozObWc59DmiNt3f5/kisqeSm05yxpfA=; X-UUID: 2d4d4ee9b12f44809e2b4bc452fe3a49-20200527 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 938018215; Wed, 27 May 2020 09:57:51 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 27 May 2020 09:53:46 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 27 May 2020 09:53:45 +0800 Message-ID: <1590544320.12671.10.camel@mhfsdcap03> Subject: Re: [PATCH v8 06/14] media: platform: Improve the implementation of the system PM ops From: Xia Jiang To: Tomasz Figa CC: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , "Matthias Brugger" , Rick Chang , , , , , , Marek Szyprowski , , , , , , Date: Wed, 27 May 2020 09:52:00 +0800 In-Reply-To: <20200521153257.GF209565@chromium.org> References: <20200403094033.8288-1-xia.jiang@mediatek.com> <20200403094033.8288-7-xia.jiang@mediatek.com> <20200521153257.GF209565@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 31B56BA102CB296BF42975F3308432FBE35B5776613BCF49476A31BDC9D305D32000:8 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 T24gVGh1LCAyMDIwLTA1LTIxIGF0IDE1OjMyICswMDAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4g SGkgWG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