From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops Date: Tue, 15 Oct 2019 14:30:53 +0200 Message-ID: <20191015123053.GA17570@8bytes.org> References: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1570622373-16413-1-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Yong Wu Cc: youlin.pei-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, anan.sun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Nicolas Boichat , srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Evan Green , Tomasz Figa , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Matthias Brugger , ming-fan.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Robin Murphy , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-mediatek@lists.infradead.org On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is because device_prepare will call pm_runtime_get_noresume > which will keep the larb's PM runtime status still is active when suspend, > then it won't enter our pm_runtime suspend callback to disable the > corresponding clocks. > > This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to > make sure it disable the larb's clocks after the multimedia devices. > > Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") > Signed-off-by: Anan Sun > Signed-off-by: Yong Wu > --- > base on v5.4-rc1. > --- > drivers/memory/mtk-smi.c | 4 ++++ > 1 file changed, 4 insertions(+) Applied, thanks.