Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9716402pxu; Tue, 29 Dec 2020 03:08:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+VWH+6y8fyaLh00H9y7c1+D9HHaDzOAG29PxQUlBZ6njIWMG0eyTdc1K0hSipwM6m/rql X-Received: by 2002:a17:906:8617:: with SMTP id o23mr45063631ejx.274.1609240139315; Tue, 29 Dec 2020 03:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609240139; cv=none; d=google.com; s=arc-20160816; b=a/s+X7tzKZQZtOl5Ym6mjo6Kr8uhOUlqlNkzVlbCjds2U6aP46CR+K6Hii6pgFCVHh YOaE/XVHhK+/sZV+NOajdWi99ogItlPYnAJpURDqgw0eVCZteKhIdyavy7X9tet0M55M kNZOXIEgTVB0bFDKKLFoou02GccgeODRVa3Z/fxqv2Cv9jcyUZatmOp6IHf6gBQHkUyk 1/MGtnVWuuHaIPMhc4ugyxt/R/jknpVcTpnhBvWy0O6Im4jrLNDGe0+oLIu99gyYA0BA ulorrn9pgHShveIBva2MP8Yy1wL/D2Dgj48uNKpiPsX2Nqt3URFBlutCWrlin+65orOJ Hfdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=kBXEFHEYE3UKfnPdFHxODX9PA3xu0wCHnxHyXHF9dIY=; b=hptw2UnTltOTpLQEy8/ryxTGzYKq67wPrGBYWjkLawcQiximbUb6JMoArTOWmUc7vz gBfnEWd6SkhC/sRXg1wmxsb7oZZN2UQF0qY+IcF5Mo7IGrtuz90OaE+g22p3Md69WB2D luWKV7STtqzjsHtk48xuXOxtm8lQEcZcibmMSqTjXmYnKuAdsJdZdf72fjLme+VeFjse tCUCooCWTNzoR3PPtCMDNYhTv4BMtLTtrIQ38UYSXtIiTznZ6IUr5NUa3Fl+ZAmXrMHY j5gJLYf6TPjlmligb3MU2zOGQJwOgctyOfQ0UOOajsIZhixbQAv07wLXwHoRHmXQJ4la rzeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Si8UijRG; 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 k2si23492365edf.160.2020.12.29.03.08.34; Tue, 29 Dec 2020 03:08:59 -0800 (PST) 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=Si8UijRG; 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 S1726156AbgL2LGv (ORCPT + 99 others); Tue, 29 Dec 2020 06:06:51 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:55379 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725986AbgL2LGv (ORCPT ); Tue, 29 Dec 2020 06:06:51 -0500 X-UUID: 8a05a6fe1c26428b9092d125bb033018-20201229 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=kBXEFHEYE3UKfnPdFHxODX9PA3xu0wCHnxHyXHF9dIY=; b=Si8UijRGBrB9rSlu49RKJzwWB5SjW5u/piNa/3eYvTymuU5/8ji2OKRDc7+uRuPL8S+cQWoRrPZbLdOV6IB46BBGELbQ1D94hMnxCNGZTVwH1N/2mJyiy331L+UJ6azeXcHa64DykBLBw6KKi0rRrFRbCgfUFcbl51JNsFUs+rg=; X-UUID: 8a05a6fe1c26428b9092d125bb033018-20201229 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1241701737; Tue, 29 Dec 2020 19:06:03 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS32N1.mediatek.inc (172.27.4.71) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 29 Dec 2020 19:06:02 +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; Tue, 29 Dec 2020 19:06:01 +0800 Message-ID: <1609239960.26323.291.camel@mhfsdcap03> Subject: Re: [PATCH v5 17/27] iommu/mediatek: Add pm runtime callback From: Yong Wu To: Tomasz Figa CC: Joerg Roedel , Matthias Brugger , Rob Herring , Will Deacon , Robin Murphy , , , Nicolas Boichat , , , , Evan Green , Tomasz Figa , , , Krzysztof Kozlowski , , Date: Tue, 29 Dec 2020 19:06:00 +0800 In-Reply-To: References: <20201209080102.26626-1-yong.wu@mediatek.com> <20201209080102.26626-18-yong.wu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 6193CBCDE50237FB6220DACC2EDA79262E49C0591F513503724C7571B2EDA9F12000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gV2VkLCAyMDIwLTEyLTIzIGF0IDE3OjMyICswOTAwLCBUb21hc3ogRmlnYSB3cm90ZToNCj4g T24gV2VkLCBEZWMgMDksID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