Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4353072pxk; Wed, 30 Sep 2020 00:11:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDXOg1mD4ZhS+pCjvyJ5HfkNnkk2wfgR4VcQpL/JXODMp4U5zK2WFIDr0La3LgSCOC+EnT X-Received: by 2002:aa7:d4d4:: with SMTP id t20mr1224845edr.229.1601449911097; Wed, 30 Sep 2020 00:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601449911; cv=none; d=google.com; s=arc-20160816; b=TUP52eWaRMYI9Ldsp8oo51/YPwaXgj/ukJZJp00oihmreeVJfheB17b3RW1C/3XaYd rjE1f/oF+k01uPVScU8VD8mP5rAuaGEIpJfn/UW9He4E3DnVV85k2Xzl0lQmoS0gFFqe L79+UbACF7ioJS2QlxNrsfwGv3UQdohZeI7FiZxIoxLPW99Tzk4rJYYxhuqSPcU3fvQs mOEiY8O351zlSxmwJWhJL8NJ52UoDiA+84thON/MZO12J5zxpho7NmSOJ+2k/uN7Y46v GCs3JCBZXjqC41wvgwChquhDuBjOJZ2YrN597uT2wvRIj0dlEsZV5HaMXv7wRez1zQ9o Mrtw== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=MFAon3GhNDukKivbaCYhme9yuORluMflbyHTCeqY9+E=; b=MA3uKlw0bpe1QlabwtG7ObOIe1SuQSJecahP4ozAkOd91SnOgMUJ8sb2EaTeGIk5RC XDoDoCV77afRR57bP9iYJFQdteK38HlD9NGxJ5rYcX3gFXijssI+O8F5aXVZroNQuD9A 6gkyxCL7d7xVu3pGUvtN5Al1QlR3kc/PROT0G6AuIYT2EffZ2X/jS1La417zoOj3d3W8 Zpq+4VZYCVSOsqMnLq60nInlyjlyQlQKDXpobZmYG21T/h1jhhVzGY0oD9jVHwvGp6/a OOoSECOhdbpMOzpji82oSuC1DCczAm1um4h5WO9pWwZ9SZ1tP+wRqvxH1lP5sm/FuX/u /shA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=kgmFvkEP; 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 a8si568956ejv.661.2020.09.30.00.11.28; Wed, 30 Sep 2020 00:11:51 -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=kgmFvkEP; 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 S1728161AbgI3HJ4 (ORCPT + 99 others); Wed, 30 Sep 2020 03:09:56 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:50696 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725440AbgI3HJz (ORCPT ); Wed, 30 Sep 2020 03:09:55 -0400 X-UUID: 5b2a7115b4464f6aaf4a0f2605758e6f-20200930 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=MFAon3GhNDukKivbaCYhme9yuORluMflbyHTCeqY9+E=; b=kgmFvkEPNz0rb9jCSnONjuy0houoewZ5TwPWrVjQsp3Wy7dbErJZFEr/dmdYNvZCKzpvG2tWW/s7ElP9rjDe4soKlP3dOv3YxvifdB9ey5Kb3Pn4fmVoDbOxW/KZ55R5w6Mf+vaNT4cFxB2zPyDe554aYJl/WXr57E26Lrb61MU=; X-UUID: 5b2a7115b4464f6aaf4a0f2605758e6f-20200930 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1759492625; Wed, 30 Sep 2020 15:09:52 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 30 Sep 2020 15:09: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; Wed, 30 Sep 2020 15:09:50 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Krzysztof Kozlowski , Will Deacon CC: Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Greg Kroah-Hartman , Subject: [PATCH v3 14/24] iommu/mediatek: Add pm runtime callback Date: Wed, 30 Sep 2020 15:06:37 +0800 Message-ID: <20200930070647.10188-15-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200930070647.10188-1-yong.wu@mediatek.com> References: <20200930070647.10188-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhpcyBwYXRjaCBhZGRzIHBtIHJ1bnRpbWUgY2FsbGJhY2suDQoNCkluIHBtIHJ1bnRpbWUgY2Fz ZSwgYWxsIHRoZSByZWdpc3RlcnMgYmFja3VwL3Jlc3RvcmUgYW5kIGJjbGsgYXJlDQpjb250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