Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4A24C433F5 for ; Mon, 6 Dec 2021 08:16:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239111AbhLFITc (ORCPT ); Mon, 6 Dec 2021 03:19:32 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:45134 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S230001AbhLFIT1 (ORCPT ); Mon, 6 Dec 2021 03:19:27 -0500 X-UUID: 609d79adcd3f4cadbe01c5f4985a4d4f-20211206 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=Gwi9NQMi+aJlqofRC9/2Cdnnhql1ssg2h7PD3Qu6tws=; b=Z08QStxoNbqTiW1WRshvSqF8wGbc7Gv6bihg6mJxnWv1F1KZbkNuOgvRuOcHG0WnUAJHvmesy3d4QAGLM7KenLjfassalmT3Jwgi8OqjEfvDTzhZHRmThBWFjoCTJyp7dG1pOr5iHICqFILsgnnEK1raH/8tUBLYSgD6clsjZpI=; X-UUID: 609d79adcd3f4cadbe01c5f4985a4d4f-20211206 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1785352478; Mon, 06 Dec 2021 16:15:55 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Mon, 6 Dec 2021 16:15:54 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 6 Dec 2021 16:15:53 +0800 Message-ID: <303eaeb2d371c96def8e5f0284495b1762879905.camel@mediatek.com> Subject: Re: [PATCH 3/4] memory: mtk-smi: Add sleep ctrl function From: Yong Wu To: Krzysztof Kozlowski CC: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , "Tomasz Figa" , , , , , , , , , , , , Rob Herring , "Matthias Brugger" Date: Mon, 6 Dec 2021 16:15:53 +0800 In-Reply-To: <9631fe7c-b878-79b0-1680-80b0be089429@canonical.com> References: <20211203064027.14993-1-yong.wu@mediatek.com> <20211203064027.14993-4-yong.wu@mediatek.com> <9631fe7c-b878-79b0-1680-80b0be089429@canonical.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gU2F0LCAyMDIxLTEyLTA0IGF0IDEyOjQ4ICswMTAwLCBLcnp5c3p0b2YgS296bG93c2tpIHdy b3RlOg0KPiBPbiAwMy8xMi8yMDIxIDA3OjQwLCBZb25nIFd1IHdyb3RlOg0KPiA+IHNsZWVwIGNv bnRyb2wgbWVhbnMgdGhhdCB3aGVuIHRoZSBsYXJiIGdvIHRvIHNsZWVwLCB3ZSBzaG91bGQgd2Fp dA0KPiA+IGEgYml0DQo+IA0KPiBzL2dvL2dvZXMvDQo+IA0KPiA+IHVudGlsIGFsbCB0aGUgY3Vy cmVudCBjb21tYW5kcyBhcmUgZmluaXNoZWQuIHRodXMsIHdoZW4gdGhlIGxhcmINCj4gPiBydW50 aW1lDQo+IA0KPiBQbGVhc2Ugc3RhcnQgZXZlcnkgc2VudGVuY2Ugd2l0aCBhIGNhcGl0YWwgbGV0 dGV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