Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1872795ybg; Thu, 4 Jun 2020 23:08:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy22ONGh7SfaM9WFge74pyCCNBkbEg8ZZgs+iK7EaR7uahosxTLIsjcdY2BFFDHmdZjGwUK X-Received: by 2002:a17:906:7e50:: with SMTP id z16mr7385423ejr.277.1591337316359; Thu, 04 Jun 2020 23:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591337316; cv=none; d=google.com; s=arc-20160816; b=qs/2XoG082L1J+syd6gUm0y1hw3Hxdky9P7rJSKOPan8M+E+XgSXgbzw1V0DMBbqgT ZneEEYrUJ9p60zasY2JWbUsHhq0IyGlv5V+AT13mGxSuvN4L3ccHLvixIDR87S11n1QE xOX35KDIo2OCF3yhF6R1ZENtNUQFCA/+RlWZC3vckSO5gYSTLhPr5vOPFlinWf2RD5kW DBIJ5k1+j8S4W/7HUrvB+gjDQkwWLMzJgS27F8PXG82zafMPLw54e91kIPtzk1d5Xamy Wg58pS0zC9b4/OvXdcN7+6cRe2xLiVQVIy/XSUCvItXdcClHEe3LTDvGQ5/pmxfxi0cg 728w== 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=NswnMBEYCB0ATqA+z8ftWgQH27FC9O8GRg7nuiNH9lw=; b=kWqqUmscDlRr9DaqL4r3P/POL3A3FpQ1unVDJNlLYYMEQKtswFRwYSShmzjiEW238Z +1nfMltg6r7F4xGLPJP9l3w30FNLGBENJ65ysXv59YEhDWPBJajvmQQYXBEWh6BKAk0Y LqOdiLRylvKPCmFcJwbg/vvbYXCaaqkYSahXnCDcsYLRubkgOwDXU5eoZH6WPA2RNrYW ngI/XroafA3j3Fhg73406n4paW4HSEYDt1xPmBjvS4boZHpyib1ozQ316Fl6b0jl1EI5 pDPuqe9Jw4T83/sKHlUf5hCAjket1umWHwFeAEt6HRQEfmseumjlLMRSn0/TNSBivrn6 ny9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ZSzwOxeV; 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 l64si3226989ede.102.2020.06.04.23.08.13; Thu, 04 Jun 2020 23:08:36 -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=ZSzwOxeV; 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 S1726227AbgFEGFO (ORCPT + 99 others); Fri, 5 Jun 2020 02:05:14 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:38939 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726044AbgFEGFN (ORCPT ); Fri, 5 Jun 2020 02:05:13 -0400 X-UUID: b13683df1aa74d8aad688b4045fa9b7e-20200605 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=NswnMBEYCB0ATqA+z8ftWgQH27FC9O8GRg7nuiNH9lw=; b=ZSzwOxeVGLQC7llW/m8kKGil0p405CRXv6I+Jnt87x1FcQ82xIa3bertIlbSbQ5BIJoss4Po7WE3XpSo++lUYqXueEkRpyyPj5mSnuzz+UbQkNgFMc3UVx+dDqAtTcdD21pKtK9FPuhq9HAd9PqUYGOMcHHFrz66GGj7qBfLCMY=; X-UUID: b13683df1aa74d8aad688b4045fa9b7e-20200605 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1904687962; Fri, 05 Jun 2020 14:05:08 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 5 Jun 2020 14:05:07 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 5 Jun 2020 14:05:04 +0800 Message-ID: <1591336981.31802.3.camel@mhfsdcap03> Subject: Re: [PATCH v8 05/14] media: platform: Improve power on and power off flow From: Xia Jiang To: Tomasz Figa CC: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , "Matthias Brugger" , Rick Chang , , , , , , Marek Szyprowski , , , , , , Date: Fri, 5 Jun 2020 14:03:01 +0800 In-Reply-To: <20200521152253.GE209565@chromium.org> References: <20200403094033.8288-1-xia.jiang@mediatek.com> <20200403094033.8288-6-xia.jiang@mediatek.com> <20200521152253.GE209565@chromium.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: D4D85237458B3F37009A20C7C482D59AA2A1276C3CD07436513B69A34E50B8692000: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 T24gVGh1LCAyMDIwLTA1LTIxIGF0IDE1OjIyICswMDAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4g SG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